webERP can be translated to any language so that the entire web-interface is displayed in the language of any user. The system can display different languages for different users - all at the same time - depending on the setting of the language in the individual users' settings.
The latest messages.po file can be downloaded from: https://github.com/timschofield/webERP/blob/master/locale/en_GB.utf8/LC_MESSAGES/messages.pot
Edit the file provided entering the translations for the strings labelled msgid in the string labelled msgstr. Watch for html strings embedded inside the strings the html will also be required in the translated string. Please complete the translation file header information - with your details so that you are accorded proper recognition for your contribution.
Return the file containing your translations to info@weberp.org
An archive of the new language directory and instructions on how to use it will be emailed for your use. The new directory created by the project admin will be added to the webERP distribution for future releases
Using the WEB Based Tools To Translate Collaboratively Point your browser to: http://www.weberp.org/translate/index.php A user name of: translator With a password of: language is required to access this private area. The webERP username of: demo and password of : weberp can be used to get into the system. It is then recommended that you create a new user for yourself by going to setup, User Accounts and entering some details as necessary. Logout from demo and login under the user name just created. Now click on your user name in the top left of the screen to modify your settings. All the languages that are being worked on are available for selection. If your language is there then select it. If your language is not there already a new language can be created using the utilities and the new language code must be entered. The translation utilities are available from the quick menu at the very top of this screen. Language codes must follow the standard format for locales, 2 lower case characters for the language and then an underscore then a further 2 characters in upper case representing the country eg: en_GB - english underscore Great Britain en_US - english underscore United States en_AU - english underscore Australia For the translation to be used the locale code must be recognised by the machine (you can check the locales defined on a *nix machine by typing locale -a at the # prompt). Having created the new language change your user account to always use this language. The translation utilities refer to each script as a module. Each module can be selected for translation using the web interface and the translation together with the english string are shown for all the text strings on that page. It is important not to enter the " character in any translations. Once the translations are entered you can go to the page that has been translated and see the effect of your translations immediately in the system. The advantage of the web based system is that the changes are immediately obvious to another translator who will not duplicate work that has already been done. When there have been changes to the underlying scripts and new strings need to be translated these will need to be merged into the translation messages.po file you have been working on. Again this can be done from the translation utilites. It is recommended that translations start with the index.php module since this main menu is the most visible of all pages. When changing a module's translation it is important to click the "Modify" to ensure the changes to translations are updated. Also, due to the nature of the web it is always appropriate to backup your work after you have done significant amounts of translation by downloading the messages.po after every session make a favouites/bookmark for the translation: http://www.weberp.org/translate/locale/xx_XX/LC_MESSAGES/messages.po where xx_XX is the locale name of your translation. You can use this file to test the translation of your local installation. That's it! However, for the more curious and technically minded more detail is provided below on the mechanics of the gettext system. Technical Overview How is it Done webERP uses the GNU gettext package for language translations. PHP must be compiled with gettext functions to enable multi-language translations. However, it will produce english if the PHP interpreter does not have the gettext functions compiled in to the server. The gettext translation files are held in the locale directory, under this directory there are sub-directories for each locale, a two character code representing the language to be used. eg en for English, it for Italian etc. New directories will be made up on request if a translator wishes to have a local version for their language. Under the locale, two character abbreviation code directory there is a further sub-directory called LC_MESSAGES - this is where the translation files exist. There are two files in each of these directories: 1. messages.po this file contains all the strings to be translated. This is the only file of concern for translators 2. messages.mo this is a binary machine searchable tranlation file used by gettext. The .mo file is produced by a gettext utility using the .po. The effort is needed to get the .po file translated - the .mo file is easily created by the project admin. Any text editor can be used to edit the .po file (GNU Emacs contains specific functionality for editing .po files there is a special PO-Mode) Understanding the messages.po File The translation is performed by tranlating the strings in the messages.po file into the other language. It is important to work on the most recent messages.po file from the locale/en/LC_MESSAGES/ deirectory in the CVS. However, the most recent messages template file will be emailed on request to the project administrator at info@webrp.org or any request to the translation list. The messages.po is made up of sections eg. for a French translation file #: AccountGroups.php:8 index.php:890 msgid "An example string in English that needs to be translated" msgstr="Une corde d'exemple dans le ce anglais doit ĂȘtre traduite " the line #: AccountGroups.php:8 index.php:890 means that the string following is used in the AccountGroups.php script on line 8 and the index.php script on line 890. It could be useful to understand the context of where the script is used. Strings that are used several times throughout the application only need to be translated once. In some cases the #: line showing where the string is used can be quite an extensive list of scripts. msgid "An example string in English that needs to be translated" this line is the english string which is to be substituted by the text in msgstr. If the value of msgstr is empty - "". gettext will return the english string. The effort of the translation is to edit the messages.po file and enter the language translation within the inverted commas of the msgstr. The .po File Header The .po file starts with some initial comments which should also be completed "SOME DESCRIPTIVE TITLE", - should be replaced with webERP - LANGUAGE Translation File - where LANGUAGE is the language being translated into # FIRST AUTHOR