README.txt 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. How to add a new language:
  2. You have to know your language code. Currently, the gettext unit simply takes
  3. the first and second character of the environment variable $LANG.
  4. Examples for this 2-char language codes are
  5. de for German
  6. en for English
  7. fr for Frensh
  8. you can check the currently selected language with the command
  9. echo $LANG
  10. change this value using
  11. (in bash)
  12. export LANG=<langcode>
  13. (in csh)
  14. setenv LANG <langcode>
  15. Then, make a copy of the file "restest.po", call the copy
  16. restest.<langcode>.po
  17. (Insert your language code for <langcode>)
  18. After this you can edit the created .po file using your favorite editor.
  19. For each string, there is an "msgid" and an "msgstr" entry. msgid is the
  20. original string, don't change its value. Just add the translated string to
  21. the "msgstr" line. Please translate the strings carefully, especially some
  22. special characters like "%" inserts or quotation marks have to be at exactly
  23. the same semantic position as in the original string.
  24. When you are finished with your translation, add the language code to
  25. the variable DEMOLANGUAGES in the Makefile and do a 'make'. If all goes
  26. well, a file
  27. restest.<langcode>.mo
  28. will be created. This file will be loaded by the restest example program.
  29. if there weren't any errors in your input file, you're finished.
  30. If you don't have 'make', you can make the .mo file with the following
  31. command:
  32. msgfmt -o restest.<langcode>.mo restest.<langcode>.po
  33. (msgfmt is part of the GNU gettext tools)
  34. If you add a new language, please send the .po file to the Free Pascal
  35. developers.
  36. Michael. <[email protected]>