Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[doc] internationalization (for issue #3162) #3195

Merged
merged 3 commits into from
Oct 26, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 14 additions & 8 deletions doc/integrator/internationalization.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ Internationalization
ngeo and server
---------------

In the ``<package>.mk`` file define the supported language with (default):
In the file ``<package>.mk``, define the supported languages with (default):

.. code:: make

LANGUAGES ?= en fr de

In the ``vars_<package>.yaml`` file define the available and default language:
In the file ``vars_<package>.yaml``, define the available and default locales:

.. code:: yaml

Expand All @@ -24,24 +24,30 @@ In the ``vars_<package>.yaml`` file define the available and default language:
default_locale_name: fr
available_locale_names: [en, fr, de]

Build your application
In the file ``language_mapping``, define any desired locale variants, for example:

The file to translate are:
.. code:: make

fr=fr-ch

Build your application.

The files to translate are:

* ``demo/locale/<lang>/LC_MESSAGES/demo-client.po`` for ngeo client
* ``demo/locale/<lang>/LC_MESSAGES/demo-server.po`` for the server part (Should be empty for ngeo interfaces)
* ``demo/locale/<lang>/LC_MESSAGES/demo-server.po`` for the server part (should be empty for ngeo interfaces)

.. note::

All the ``#, fuzzy`` strings should be verified ans the line should be removed.
(if the line is not removed the localisation will not be used.)
All the ``#, fuzzy`` strings should be verified and the line should be removed
(if the line is not removed, the localisation will not be used).

----
CGXP
----

Translations of the browser interfaces (main viewer, edit interfaces and APIs)
are included in two kinds of Javascript files stored in
are included in two kinds of Javascript files, stored in
``<package>/static/js/Proj/Lang/``:

* ``<lang>.js`` is used to translate data-related strings such as layernames or
Expand Down