doc/developer/LanguageTranslation

Version 1 (modified by Pascal Leclerc, 14 years ago)

--

Howto add translation

  1. Using a shell, go to /path_to/wifidog/locale directory.
  2. Create a new directory for your new language ( ex: "ru" for Russian, "jp" for japanese, etc ). The Russian language will be use as example.
  3. Create the same folder hierarchy as in "fr" ( ./ru/LC_MESSAGES )
  4. Execute the shell script gen.sh, this will grab new strings in ./ru/LC_MESSAGES/messages.po. If you received errors like "PHP is not supported", make sure you have the latest version of Gettext and you're using the xgettext version provided with PHP5. If xgettext is not in your PATH, try locate xgettext to find it.
  5. Edit message.po. If you're under Linux use  KBabel for translation, otherwise make sure your text editor writes UTF-8 (  xemacs manages .po pretty well )
  6. Once completed, run the script compile.sh, this will create a ./ru/LC_MESSAGES/messages.mo binary file
  7. Add "ru" locale to config.php
  8. Restart Apache. You will have to do this when you recompile, because .mo binary files are cached by gettext.
  9. You should now be able to select your language !
  10. Finally, send us your translation file (message.po). We will add it to Wifidog Captive Portal.