I'm following this tutorial about building a multilingual web sites using PHP gettext http://onlamp.com/pub/a/php/2002/06/13/php.html
I understand the tutorial until this part:
After you have the directories all prepared, it's time to create the actual "pot" file, as it is usually referred to: the messages.po file. To do this, you will need to have PHP files that use the gettext() function to "mark" strings to be translated and use the xgettext command.
$ xgettext -n *.php
Do I have to write that in the command line? In which folder do I have to be when I execute that command? Is that the Linux version of the command or for Windows?
(I enabled the gettext extension in my wamp ini file) Do I have to download gettext utilites from the GNU web page in order to create .po files?
A . PO file is a portable object file, which is text-based. These types of files are used in commonly in software development. The . PO file may be referenced by Java programs, GNU gettext, or other software programs as a properties file.
Gettext works by, first, generating a template file with all the strings to be translated directly extracted from the source files, this template file is called a . pot file which stands for Portable Object Template.
To open PO and POT files, you can use any text editor that supports the format (such as Notepad, Sublime Text, or Notepad++), use specialized software (like Poedit), or Localazy - the online translation management system explicitly made for working with translation file formats.
You can use graphical tools like Poedit to create, edit and compile .po files : http://www.poedit.net/
Features :
If you prefer the command line, xgettext (from the gettext tools) is the command to extract strings from sources. It's a GNU software available on Linux (already packaged for your distribution) and Windows (via Cygwin for example).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With