SBX - Search With Button

SBX - Forum Post Title

Portal webpages in multiple languages

Microsoft Dynamics CRM Forum

Sahithi asked a question on 9 Feb 2019 11:50 AM

Question Status

Suggested Answer

I have a custom web page which I'm showing the entity list in the form of tiles using the web template like below:

{% for item in entityview.records %}							  								
									
	<item>										
	   <div id="deviceList" style="display:inline-block; width:250px;">								
		Model: {{ item.model }} <br/>
		Date Purchased:{{ item.purchasedate }}<br/>
		Serial Number:{{ item.deviceserialnumber }}<br/>
	    </div>
	</item>
	
{% endfor %}

My issue is : This portal has to be enabled for 15 languages. If this a OOB entity form, I'd have used entity metadata to add the labels in different languages.

But this is a custom page. The only solution I could find is to create 15 page templates and 15 web templates and put them in the corresponding localized content of the web pages. 

Is there any other solution than this? A more effective and less regressive way of doing things?

Reply
Oliver Rodrigues responded on 11 Feb 2019 5:47 AM
My Badges
Suggested Answer

Does your attributes also change according to the selected language? for example, would you have an attribute Model for English, another attribute let's say Model_FR for french etc?

if not, I would suggest that you create a Content Snippet for every label in your Entity List page (because the only difference would be the labels and not the content)..

than you call your snippets within the Web Template:

{{ snippets['YOUR SNIPPET HERE'] | default: 'DEFAULT VALUE' }}


this way you would have 15 (1 per each language) snippets per attribute/label/static texts in your page.. so yeah it would be a large number of snippets.. but you would have only 1 web template.. so any maintenance would be only in one place

if you need to select different attributes according to the language.. you have two options:

 - keep 1 Page Template.. and have actually 16 Web Template.. the first one would only verify the selected language.. and call the appropriate localized Web Template

 - or create the 15 Page templates/Web templates as you mentioned 

Reply
Oliver Rodrigues responded on 11 Feb 2019 5:47 AM
My Badges
Suggested Answer

Does your attributes also change according to the selected language? for example, would you have an attribute Model for English, another attribute let's say Model_FR for french etc?

if not, I would suggest that you create a Content Snippet for every label in your Entity List page (because the only difference would be the labels and not the content)..

than you call your snippets within the Web Template:

{{ snippets['YOUR SNIPPET HERE'] | default: 'DEFAULT VALUE' }}


this way you would have 15 (1 per each language) snippets per attribute/label/static texts in your page.. so yeah it would be a large number of snippets.. but you would have only 1 web template.. so any maintenance would be only in one place

if you need to select different attributes according to the language.. you have two options:

 - keep 1 Page Template.. and have actually 16 Web Template.. the first one would only verify the selected language.. and call the appropriate localized Web Template

 - or create the 15 Page templates/Web templates as you mentioned 

Reply

SBX - Two Col Forum

SBX - Migrated JS