Portal Engine Questions on portal engine and web parts.
Version 7.x > Portal Engine > test localisation in document type transformation View modes: 
User avatar
Member
Member
pavel.1991-tut - 4/9/2013 6:12:08 AM
   
test localisation in document type transformation
I need to insert text in transformation. This text must be in different languages. I tried to use macros {$=Send$}, but macros does not work. What do I do?

User avatar
Certified Developer 8
Certified Developer 8
Petr Dvorak - 4/9/2013 1:42:48 PM
   
RE:test localisation in document type transformation
If you are using ASCX transformations, you can use ResHelper:
<%# ResHelper.GetString("myUIString")%>

User avatar
Kentico Support
Kentico Support
kentico_filipl - 4/10/2013 1:55:11 AM
   
RE:test localisation in document type transformation
Hello Pavel,

Petr Dvorak is correct. If you have your resource string defined in Site Manager -> Development -> UI Cultures, you can use ResHelper for multilingual texts in transformations.

Best Regards,
Filip Ligac

User avatar
Member
Member
pavel.1991-tut - 4/10/2013 3:36:07 AM
   
RE:test localisation in document type transformation
In custom form layout I can use languages macroses. Why can't I use it document type transformations? It means that there is only one way to do what I want and it is to create resource string in Site Manager -> Development -> UI Cultures?

User avatar
Kentico Support
Kentico Support
kentico_filipl - 4/11/2013 1:44:40 AM
   
RE:test localisation in document type transformation
Hello Pavel,

even if you use localization macros like {$someKey$}, it is resolved from the collection of defined resource strings for the site by calling ResHelper.GetString() method unless you use In-place localization macros - the example could look like this:
<%# CMS.CMSHelper.CMSContext.CurrentResolver.ResolveMacros("{$=OK|cs-cz=dobre|de-de=gut$}") %>

You can take a look at Developer's Guide - Types of macros for further details.

Best regards,
Filip Ligac

User avatar
Member
Member
pavel.1991-tut - 5/17/2013 10:51:40 AM
   
RE:test localisation in document type transformation
If I understood you right, here(Site Manager -> Development -> UI Cultures) I can create some string. And then I can call this string using method ResHelper.GetString()
?
1) Am I correct understand you?
2) I've created new string, and I added text to this string. But it is only one language. How can define metalanguage string?
3) Are there any other opportunity to work with multilingual text or UI Cultures strings are the only way?
4) Here Site Manager -> Development -> UI Cultures there are two tabs
Default culture All cultures. What do they need for? Can you give me the url where I can read about this?

User avatar
Kentico Support
Kentico Support
kentico_filipl - 5/18/2013 1:00:53 AM
   
RE:test localisation in document type transformation
Hello Pavel,

1) Yes, you are correct. Resource strings can be managed in Site Manager -> Development -> UI Cultures.
2) You can define resource string for more languages when you click on All cultures tab and then New UI culture. This will create a new culture which contains all resource strings of the site and then you can create corresponding translations.
3) If you are referring to resource strings, they can also be edited in CMS Desk -> Administration -> Categories.
4) In default culture, you define resource strings for the default culture and in All cultures tab, you define resource strings translations to other languages. Translating resource strings is described in more details in Developer's Guide - Translating localization strings.

Best regards,
Filip Ligac