doc/book/en/development/devweb/internationalization.rst
changeset 1898 39b37f90a8a4
parent 1714 a721966779be
child 2476 1294a6bdf3bf
equal deleted inserted replaced
1897:ff2abadcf0cf 1898:39b37f90a8a4
    76 Once the internationalization is done in your application's code, you need
    76 Once the internationalization is done in your application's code, you need
    77 to populate and update the translation catalog. Cubicweb provides the
    77 to populate and update the translation catalog. Cubicweb provides the
    78 following commands for this purpose:
    78 following commands for this purpose:
    79 
    79 
    80 
    80 
    81 * `i18nlibupdate` updates Cubicweb framework's translation
    81 * `i18ncubicweb` updates Cubicweb framework's translation
    82   catalogs. Unless you work on the framework development, you don't
    82   catalogs. Unless you work on the framework development, you don't
    83   need to use this command.
    83   need to use this command.
    84 
    84 
    85 * `i18nupdate` updates the translation catalogs of *one particular
    85 * `i18ncube` updates the translation catalogs of *one particular
    86   component* (or of all components). After this command is
    86   component* (or of all components). After this command is
    87   executed you must update the translation files *.po* in the "i18n"
    87   executed you must update the translation files *.po* in the "i18n"
    88   directory of your template. This command will of course not remove
    88   directory of your template. This command will of course not remove
    89   existing translations still in use.
    89   existing translations still in use.
    90 
    90 
    91 * `i18ncompile` recompile the translation catalogs of *one particular
    91 * `i18ninstance` recompile the translation catalogs of *one particular
    92   instance* (or of all instances) after the translation catalogs of
    92   instance* (or of all instances) after the translation catalogs of
    93   its components have been updated. This command is automatically
    93   its components have been updated. This command is automatically
    94   called every time you create or update your instance. The compiled
    94   called every time you create or update your instance. The compiled
    95   catalogs (*.mo*) are stored in the i18n/<lang>/LC_MESSAGES of
    95   catalogs (*.mo*) are stored in the i18n/<lang>/LC_MESSAGES of
    96   application where `lang` is the language identifier ('en' or 'fr'
    96   application where `lang` is the language identifier ('en' or 'fr'
   101 ```````
   101 ```````
   102 You have added and/or modified some translation strings in your application
   102 You have added and/or modified some translation strings in your application
   103 (after creating a new view or modifying the application's schema for exemple).
   103 (after creating a new view or modifying the application's schema for exemple).
   104 To update the translation catalogs you need to do:
   104 To update the translation catalogs you need to do:
   105 
   105 
   106 1. `cubicweb-ctl i18nupdate <component>`
   106 1. `cubicweb-ctl i18ncube <component>`
   107 2. Edit the <component>/xxx.po  files and add missing translations (empty `msgstr`)
   107 2. Edit the <component>/xxx.po  files and add missing translations (empty `msgstr`)
   108 3. `hg ci -m "updated i18n catalogs"`
   108 3. `hg ci -m "updated i18n catalogs"`
   109 4. `cubicweb-ctl i18ncompile <myapplication>`
   109 4. `cubicweb-ctl i18ninstance <myapplication>`
   110 
   110