-
Book Overview & Buying
-
Table Of Contents
Symfony 1.3 Web Application Development
By :
Although the data that is stored in the database has three translations, we still need to address the static text on the template. Although Symfony provides several options, we will stick to the default, which is XLIFF (XML Localization Interchange File Format).
XLIFF is an XML-based format for localization that is partly integrated into the I18N helper. Any text on the template that needs to be translated should be passed into the __() function. The text is then looked up in a dictionary file. If a match is found, the translated version is sent back.
The dictionary files are in an XML format and should be named messages.[language].xml and stored in either the application i18n/ folder or the module i18n/ folder, depending on whether or not they're global.
Of course, the dictionary files can be structured by name. I have chosen to use the default name, messages, as a part of the filename. You can, however, prepend something a little more meaningful rather than...
Change the font size
Change margin width
Change background colour