Dashboard > RIFE > ... > Templates > Localization through blocks
RIFE Log In | Sign Up   View a printable version of the current page.
Localization through blocks


Added by Geert Bevin, last edited by Emmanuel Okyere II on Nov 07, 2005  (view change)
Labels: 
(None)


While resource bundles offer a good method to isolate localized text snippets, it's sometimes interesting to be able to conditionally display parts of templates with lots of markup. For this purpose, resource bundles are actually awkward to use. Templates are therefore able to set blocks automatically to values, according to the default localization language (L10N_DEFAULT_LANGUAGE configuration parameter). This can be done with the <!--B 'LANG:id:language'--> block syntax.

For example:

<!--V 'LANG:value1'-->default<!--/V--> [!V 'LANG:value2'/]
<!--B 'LANG:value1:nl'-->ja ja<!--/B-->
[!B 'LANG:value2:fr']oui oui[!/B]
[!B 'LANG:value2:en ']yes yes[!/B]

will display this when the default language is 'en'

default yes yes

or this when the default language is 'fr'

default oui oui

or this when the default language is 'nl'

ja ja [!V 'LANG:value2'/]



Are you enjoying Confluence? Please consider purchasing it today.
Powered by Atlassian Confluence, the Enterprise Wiki. (Version: 2.2.1a Build:#515 May 19, 2006) - Bug/feature request - Contact Administrators