Portal Engine Questions on portal engine and web parts.
Version 5.x > Portal Engine > Localization macro in transformation View modes: 
User avatar
Member
Member
gatsby0121 - 4/28/2011 9:59:18 AM
   
Localization macro in transformation
I'm using {$=Download|fr-ca=Téléchargement$} in a transformation. But it just shows up as {$=Download|fr-ca=Téléchargement$}, not Download in english or Téléchargement in French.

Is it possible to use localization macros in transformations?

User avatar
Kentico Support
Kentico Support
kentico_zdenekc - 4/28/2011 1:10:16 PM
   
RE:Localization macro in transformation
Hi,

Yes, it can be used, however it's not resolved in the transformation code directly, you need to call the resolving method in inline code like:

<%# CMS.CMSHelper.CMSContext.CurrentResolver.ResolveMacros("{$=Download|fr-ca=Téléchargement$}") %>

This is also mentioned in Appendix A - Macros in DevGuide
You can see there's also an option to use LocalizeString method, when you define the resource string in \CMSResources .resx files or in the CMS database, like described in Configuring multilingual and RTL UI article / part How to add your own strings section

Regards,
Zdenek