Nasıl oluşturmak için. Po dosyaları Windows xgettext kullanıyor?

1 Cevap php

Ben PHP gettext http://onlamp.com/pub/a/php/2002/06/13/php.html kullanarak çok dilli web siteleri inşa ilgili bu öğretici takip ediyorum

Ben bu kısmı kadar öğretici anlamak:

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?

1 Cevap

You can use graphical tools like Poedit to create, edit and compile .po files : http://www.poedit.net/

Features:

  • . Mo dosyaları (isteğe bağlı) Otomatik derleme.
  • Sen çevrilebilir dizeleri için kaynak kodunu taramak için poEdit kullanabilirsiniz.
  • [...]

Eğer komut satırı tercih ederseniz, xgettext (gettext araçları) kaynaklardan dizeleri ayıklamak için komut. Bu (örneğin Cygwin aracılığıyla) Linux (zaten dağıtım için paketlenmiş) ve Windows üzerinde kullanılabilir bir GNU yazılımdır.