Localization is the translation of Scilab interface from one language to another. Scilab is worlwide used. Thus, it is important Scilab be available in different languages.

All Scilab messages, menus, ... are available for localization. If you want to help us translating Scilab in your mother tongue, create an account in Launchpad and ask to become a Scilab project member (https://launchpad.net/scilab). A dedicated mailing list exists for those interested in localizing Scilab: localization@lists.scilab.org

All help pages can also be translated. If you are interested to translate english help pages to your mother tongue, please contact us at: contribute@scilab-enterprises.com

How to localize Scilab

The Scilab process for localization is done through Launchpad/Rosetta. Launchpad is a service developed by Canonical mainly for Ubuntu. Scilab uses it to help translate our software.

The localization is done on this URL: https://translations.launchpad.net/scilab/. Once your Launchpad account is created, you will have to join Scilab.team to submit your proposals to Scilab translations. Scilab project is under "Restricted" permission policy to ensure translation quality.

Once a localization reached a good enough level, send an email to the mailing list localization@lists.scilab.org to ask for a synchronization.


How to translate Scilab documentation

The Scilab documentation is based on the Docbook format. Docbook is the reference to write documentation. This source files for the Scilab documentation are stored in the source tree. For example, french localization files are available:

To translate Scilab documentation, follow the steps:

  1. Download Scilab source tree git clone git://git.scilab.org/scilab scilab.source

  2. Go into Scilab base source tree (cd scilab.source/scilab)

  3. For each Scilab modules modules/*/

    1. Copy the content of modules/yyy/help/en_US to modules/yyy/help/xx_XX(xx_XX being your language code).

    2. Translate the files.
    3. If you do not want to translate a file, remove it from the modules/yyy/help/xx_XX directory (english files are be automatically used when not available).

  4. Send us the translated files (tar zcvf translation_xx_XX.tar.gz modules/*/help/xx_XX) through the bug tracker or the dev mailing list

You can use various editors to update the documentation:

Mailing lists

Localization in English

中文(繁體)本土化(Chinese Traditional)


Update of the localization files

If any change has been made on any string in the source, localization files must be updated.

To facilitate this, we developed a script to do this :

Using this script is straightforward.

export SCI=/path/to/scilab/source/tree/
sh tools/localization/updateLocalizationModule.sh <module_name> 

If module_name is process_all, it will regenerate all localization files of Scilab.

Thanks to gettext tools, this script is intelligent. It will detect if a string has been changed (it will then update the line in all the .po files of a module), added (it will add it) or removed.

Localization files

Localization files are stored in :

# SCI/modules/<module>/locales/<locale>/messages.po

For example, the French localization files of the interpolation module is modules/interpolation/locales/fr_FR/messages.po

There are one localization files per module and per language. At the moment, we have English (en_US) and French (fr_FR).

Java localization

gettext is generating java classes (called ResourceBundle) which contain the localized strings. In the root Makefile.am of Scilab, we generate this class with the command: \$(MSGFMT) \$(MSGFMT_OPTS) --statistics --locale \$\$LOCALE -r org.scilab.modules.localization.Messages --java2 -d \$(top_builddir)/modules/localization/build/classes/ \$\$POFILE; which is going to generate classes into SCI/modules/localization/build/classes/org/scilab/modules/localization/Messages*class

To manage the localization, we created the class (modules/localization/src/java/org/scilab/modules/localization/Messages.java) which is in charge of:

To translate a string, it is straightforward:

import org.scilab.modules.localization.Messages;
Messages.gettext("My own string");

Most of the message of the GUI are located into XML files (like modules/gui/etc/main_menubar.xml). These files are processed by 2 pass:

Synchronize Launchpad => Scilab

When a language has been translated under Launchpad/Rosetta and there is the need to synchronize Scilab source tree with the latest version of the localization files.

  1. Request a full download of the localization files

  2. Unpack the archive
  3. Under Linux:
    1. export SCI=/path/to/your/source/tree
    2. sh \$SCI/tools/localization/dispatchLocalizationFile.sh /path/to/the/unpack/archive/

All localization files should be dispatched into the Scilab source tree.


Work completed to update modules

Localization: Module list update

public: Localization (last edited 2018-04-29 14:32:34 by static-176-158-62-11)