It is noteworthy that, according to the GNU gettext FAQ[1], * source code must be ASCII *. That means that you can't write code like
<?= _("áááàààãã")?>
in UTF-8, ISO-8859-1 or whatever, and hope that that will work. It won't.
[1]http://www.gnu.org/software/gettext/FAQ.html#nonascii_strings
Gettext
- Introdução
- Instalação/Configuração
- Constantes pré-definidas
- Funções da Gettext
- bind_textdomain_codeset — Define qual codificação de caractere será retornado pelas mensagens do catálogo do DOMÍNIO especificado.
- bindtextdomain — Configura o caminho para um domínio
- dcgettext — Substitui o domínio por um lookup
- dcngettext — O mesmo que dcgettext, porém permite que você especifique mais de uma mensagem
- dgettext — Sobreescreve o domínio atual
- dngettext — O mesmo que dgettext, porém você pode escrever mais de uma mensagem
- gettext — Procura por uma mensagem no domínio atual
- ngettext — O mesmo que gettext, mas você pode especificar mais de uma mensagem
- textdomain — Seta o domínio padrão
Gettext
djogopatrao at gmail dot com
10-Dec-2008 10:49
10-Dec-2008 10:49
php at devicenull dot org
20-Aug-2008 07:58
20-Aug-2008 07:58
To get this working properly on debian, install the locales-all package. I just spent a few hours finding a bug where it wouldn't work because that package is missing
thomasdecaux at hotmail dot com
14-Aug-2008 01:42
14-Aug-2008 01:42
Gettext is a function allowing to get translated text from a table. Its the common function used to internationalize a web site.
