From Qubit Toolkit
Jump to: navigation, search

Here are instructions how to contribute translations to this project

[edit] Consolidating translation files

AtoM translation files are stored at the application level (e.g. apps/qubit/i18n/es/messages.xml) and for individual plugins (e.g. plugins/sfIsadPlugin/i18n/es/messages.xml). This structure is used so translation strings for a plugin are stored within the plugin directory; the down side of the arrangement is that there are currently 380 different translation files in the application (one per culture per plugin + one per culture for the application)!

To consolidate all of the various translations files in to a single "dictionary" file (one per culture) there is a command-line (CLI) script. To run the script:

  1. Open a Command-line interface
  2. Change your working directory to the AtoM home directory, e.g. cd /var/www/atom
  3. Run the "consolidate" script: php symfony i18n:consolidate [language-code] [target-directory], where
    • [language-code] is the two letter ISO-639-1 language code, e.g. "es" for Spanish
    • [target-directory] is target directory for the consolidated file. This could be "." for the local working directory, "/home/username" (your home directory), "/tmp" (the "temp" directory), or any other directory to which you have write permissions.

The output file will be written to [target-directory]/[language-code]/messages.xml


david$ php symfony i18n:consolidate es .
>> i18n      Consolidating es i18n messages
Personal tools