117 |
117 |
118 `CubicWeb` is fully internationalized. Translation catalogs are found in |
118 `CubicWeb` is fully internationalized. Translation catalogs are found in |
119 ``myapp/i18n``. To compile the translation files, use the `gettext` tools |
119 ``myapp/i18n``. To compile the translation files, use the `gettext` tools |
120 or the ``laxctl`` command :: |
120 or the ``laxctl`` command :: |
121 |
121 |
122 $ python myapp/bin/laxctl i18nupdate |
122 $ python myapp/bin/laxctl i18ncube |
123 $ python myapp/bin/laxctl i18ncompile |
123 $ python myapp/bin/laxctl i18ninstance |
124 |
124 |
125 Ignore the errors that print "No translation file found for domain |
125 Ignore the errors that print "No translation file found for domain |
126 'cubicweb'". They disappear after the first run of i18ncompile. |
126 'cubicweb'". They disappear after the first run of i18ninstance. |
127 |
127 |
128 .. note:: The command myapp/bin/laxctl i18nupdate needs to be executed |
128 .. note:: The command myapp/bin/laxctl i18ncube needs to be executed |
129 only if your application is using cubes from cubicweb-apps. |
129 only if your application is using cubes from cubicweb-apps. |
130 Otherwise, please skip it. |
130 Otherwise, please skip it. |
131 |
131 |
132 You will never need to add new entries in the translation catalog. Instead we would |
132 You will never need to add new entries in the translation catalog. Instead we would |
133 recommand you to use ``self.req._("msgId")`` in your application code |
133 recommand you to use ``self.req._("msgId")`` in your application code |
134 to flag new message id to add to the catalog, where ``_`` refers to |
134 to flag new message id to add to the catalog, where ``_`` refers to |
135 xgettext that is used to collect new strings to translate. |
135 xgettext that is used to collect new strings to translate. |
136 While running ``laxctl i18nupdate``, new string will be added to the catalogs. |
136 While running ``laxctl i18ncube``, new string will be added to the catalogs. |
137 |
137 |
138 Generating the data directory |
138 Generating the data directory |
139 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
139 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
140 |
140 |
141 In order to generate the ``myapp/data`` directory that holds the static |
141 In order to generate the ``myapp/data`` directory that holds the static |