Dashboard > RIFE > ... > Templates > Localization through blocks > Information > Page Comparison
RIFE Log In   View a printable version of the current page.
Localization through blocks


Version 2 by Geert Bevin
on May 22, 2004 22:57.


compared with
Current by Emmanuel Okyere II
on Nov 07, 2005 17:56.

(show comment)
 
Key
These lines were removed. This word was removed.
These lines were added. This word was added.

View page history


There are 1 changes. View first change.

   
  
  {anchor:top}
 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:
  
 {code:xml}
 <!--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]
 {code}
  
 will display this when the default language is '{{en}}'
  
 {noformat}
 default yes yes
 {noformat}
  
 or this when the default language is '{{fr}}'
  
 {noformat}
 default oui oui
 {noformat}
  
 or this when the default language is '{{nl}}'
  
 {noformat}
 ja ja [!V 'LANG:value2'/]
 {noformat}


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