Projekt

Obecné

Profil

Stáhnout (3.45 KB) Statistiky
| Větev: | Tag: | Revize:
1
Translator Info
2
---------------
3

    
4
If you like phpPgAdmin, then why not translate it into your native language?
5

    
6
Translation is slightly complicated in phpPgAdmin compared to other PHP
7
software, since we support viewing database encodings that are different to
8
your language encoding.
9

    
10
Also, there are quite a large number of strings to be translated.  Partial
11
translations are better than no translations at all, and a rough guide is that
12
the strings are in the order from most important to least important in the
13
language file.  You can ask the developers list if you don't know what a
14
certain string means.
15

    
16
To translate messages, you will need to install GNU Recode on your computer.
17

    
18
GNU Recode: http://www.gnu.org/software/recode/recode.html
19

    
20
Your favourite OS should have a GNU Recode package available. (See bottom for
21
details.)
22

    
23
Once you have Recode installed, these are the steps to creating a new
24
translation:
25

    
26
1. Go to the lang/ subdirectory
27

    
28
2. Copy english.php to yourlanguage.php
29

    
30
3. Update the comment at the top of the file.  Put yourself as the language 
31
   maintainer. Edit the 'applang' variable and put your language's name in it,
32
   in your language.
33
  
34
   Edit the 'appcharset' variable and put in the name of the encoding for your
35
   language.
36

    
37
4. Go through as much of the rest of the file as you wish, replacing the
38
   English strings with strings in your native language.
39

    
40
At this point, you can send the yourlanguage.php file to us and we will take
41
care of testing and recoding the translation.  Please only do that if you 
42
find the rest of these steps too difficult.
43

    
44
5. Edit the Makefile in the lang/ directory and add an entry for your new
45
   language.  Note that the parameter for Recode is "yourcharset..HTML".
46

    
47
6. Run the Makefile by typing 'make yourlanguage'.  A recoded language file
48
   will appear in the lang/recoded/ directory.  If the recoding fails, then
49
   fix the error in your language file and try again.
50

    
51
7. The HTML encoded language file is what phpPgAdmin actually uses to display
52
   localised strings.  Have a look at the recoded file to see how the HTML
53
   encoding works.  By encoding your language like this, we can display your
54
   language's characters as well as the characters of the language in your
55
   database.
56

    
57
8. To add your language to phpPgAdmin, edit the lang/translations.php file
58
   and add your language to the $appLangFiles array.
59
   You must include the HTML encoded version of your language's name.  You can
60
   get this from the recoded version of your translated strings file.
61
   Also, add your language to the $availableLanguages array for
62
   browser auto detection.
63

    
64
9. Send your contribution to us.  We need the lib.inc.php entry as well as the
65
   yourlanguage.php file in lang/.  We don't need the recoded file as we can
66
   recode it ourselves before committing it.  Email to the developers list:
67
   phppgadmin-devel@lists.sourceforge.net
68

    
69
10. Thank you for your contribution!  You have just made phpPgAdmin accessible
70
    to thousands more users!
71

    
72
11. There exists a tool named 'langcheck' in the lang/ directory.  To run it,
73
    just type 'php langcheck <language>'.  It will give you a report about
74
    which strings are missing from your language file and which need to be
75
    deleted.
76

    
77
Appendix A: Ways to Get Recode
78
------------------------------
79

    
80
* FreeBSD: cd /usr/ports/converters/recode; make install clean
81
* BSD: ftp.gnu.org/gnu/recode/
82
* Red Hat: rpm -Uvh recode-3.6-6.i386.rpm
83
* Debian: Available via apt-get
84
* Win32: http://unxutils.sourceforge.net
(8-8/53)