home *** CD-ROM | disk | FTP | other *** search
/ ftp.wwiv.com / ftp.wwiv.com.zip / ftp.wwiv.com / pub / BBS / AMC0995.ZIP / lib / lang / README < prev   
Text File  |  2004-06-26  |  2KB  |  46 lines

  1. How to add a new language:
  2.  
  3. You have to know your language code.  Currently, the AMC gettext unit
  4. simply takes the first and second character of the environment variable
  5. $AMC_LANG.  Examples for this 2-char language codes are
  6.   de  = German
  7.   en  = English
  8.   nl  = French
  9.  
  10. You can check the currently selected language with the command
  11.   echo $AMC_LANG
  12.  
  13. change this value using 
  14. (in bash)
  15.   export AMC_LANG=<langcode>
  16. (in csh)
  17.   setenv AMC_LANG <langcode>
  18.  
  19. Then, make a copy of the file "amc_messages.00.po", call the copy
  20.   amc_messages.<langcode>.po 
  21. (Insert your language code for <langcode>)
  22.  
  23. After this you can edit the created .po file using your favourite
  24. editor.  For each string, there is an "msgid" and an "msgstr" entry.
  25. msgid is an internal string, don't change its value.  Just add the
  26. translated string to the "msgstr" line. 
  27.  
  28. When you are finished with your translation, add the language code to
  29. the variable AMCLANGUAGES in the Makefile and do a 'make'.  If all goes
  30. well, a file
  31.   amc_messages.<langcode>.mo
  32. will be created.  This file will be loaded by the AMC program.  If
  33. there weren't any errors in your input file, you're finished.
  34.  
  35. If you don't have 'make', you can make the .mo file with the following
  36. command:
  37.  
  38. msgfmt -o amc_messages.<langcode>.mo amc_messages.<langcode>.po
  39.  
  40. If you add a new language, please send the .po file to the author of
  41. AMC to be included in future releases.
  42.  
  43. Johannes Beekhuizen <jbeekhui@duinheks.xs4all.nl>
  44.  
  45. With thanks to Michael VanCanneyt for the original gettext unit in FPC
  46. and the original of this README.