Portal Engine Questions on portal engine and web parts.
Version 5.x > Portal Engine > Multi-lingual Portal Template Layout/Header View modes: 
User avatar
Member
Member
ZachW - 3/28/2012 10:04:11 AM
   
Multi-lingual Portal Template Layout/Header
I have created a custom template in the Portal Engine. I have added quite a bit to the Header and Layout sections of the template to add some static content and to add highly customized code for Google Maps in the header. I need to make this content multilingual. How can I do that in the HTML of the Layout AND the javascipt in the Head?

User avatar
Kentico Developer
Kentico Developer
kentico_ivanat - 3/29/2012 8:42:07 AM
   
RE:Multi-lingual Portal Template Layout/Header
Hi,

in case your site is multilingual you may insert localization macros into your layout:
In place localization

Only the content of editable text or image will be different in case you will not use localization expressions.

If these templates are different it may be better to create more versions of templates, one for each culture.

Best regards,
Ivana Tomanickova


User avatar
Member
Member
ZachW - 3/29/2012 9:04:16 AM
   
RE:Multi-lingual Portal Template Layout/Header
That's not working with what I'm doing. Let me be more specific... I have a custom Portal Template. In the 'Layout' Tab I've selected 'Use custom layout'. In the box below, I have my HTML. In that HTML I have some static content. This is the content I'd like to make multi-lingual.

I can make different templates but can I have different templates for two different languages on the same document or would I have to create a whole separate document for my Spanish version?

User avatar
Kentico Developer
Kentico Developer
kentico_ivanat - 4/3/2012 2:17:24 AM
   
RE:Multi-lingual Portal Template Layout/Header
Hi,

I cannot see your html code, but in case there is some longer static text you could create custom macro and based on current document culture, you could display the language version of your code. You could simply add a switch to the code and in case EN culture display English code, in case other culture, display this culture.

How to create a custom macro is described here:
Types of macros

The current culture is available in the:
CMSContext.CurrentDocumentCulture.CultureCode;

This way you could use the same template in both cultures.

Best regards,
Ivana Tomanickova