Involver Developer Network : locale_context
This page last changed on Apr 20, 2012 by barry.hobbs@involver.com.
The purpose of this tag is to provide a temporary override inside of another locale context. It is the final word for the locale to use for all translations inside of the tag block. One notable exception is javascript calls, using the locale_for_js tag, which can be overridden using this tag, but will impact all future javascript-based translations on that page rendering. Example: If your current locale is 'en', this block: {% localize name:'choose_category' %} would render as
for our example phrasebook. Inside the override block like this: {%locale_context locale:'fr'%} {% localize name:'choose_category' %} {%endlocale_context%} it would render as:
This overrides all translation locale, even if you have marked your localization configuration to force to the default locale. Multiple tags may be used around multiple sections, but nesting will result in the deepest tag winning. |
![]() |
Document generated by Confluence on Feb 12, 2013 09:09 |