* [devel] Нужна консультация по использованию perl-gettext
@ 2002-10-27 18:57 Yura Zotov
2002-10-27 19:17 ` Sergey Vlasov
0 siblings, 1 reply; 2+ messages in thread
From: Yura Zotov @ 2002-10-27 18:57 UTC (permalink / raw)
To: Devel-Sisyphus List
Проконсультируйте, пожалуйста, по использованию perl-gettext.
Вот кусок текста программы:
bindtextdomain( "qqq", "locale");
textdomain( "qqq");
print gettext( "Hello!"), "\n";
При установленной русской локали выводится "Привет!". Если
выполнить
LC_MESSAGES=de LANG=de ./test
получаем
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = "ru_RU.KOI8-R",
LC_ALL = (unset),
LC_MESSAGES = "de",
LC_MONETARY = "ru_RU.KOI8-R",
LC_NUMERIC = "ru_RU.KOI8-R",
LC_COLLATE = "ru_RU.KOI8-R",
LC_CTYPE = "ru_RU.KOI8-R",
LC_TIME = "ru_RU.KOI8-R",
LANG = "de"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
Hello!
Как понимать эти сообщения? Что нужно сделать, чтобы получить
сообщения на немецком (файл с переводом есть и лежит в
locale/de/LC_MESSAGES/qqq.mo)? Где почитать про работу локали,
использование gettext и т.п.?
--
Юрий А. Зотов
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [devel] Нужна консультация по использованию perl-gettext
2002-10-27 18:57 [devel] Нужна консультация по использованию perl-gettext Yura Zotov
@ 2002-10-27 19:17 ` Sergey Vlasov
0 siblings, 0 replies; 2+ messages in thread
From: Sergey Vlasov @ 2002-10-27 19:17 UTC (permalink / raw)
To: devel
On Sun, 27 Oct 2002 21:57:56 +0300
Yura Zotov <yznews@hotbox.ru> wrote:
> LC_MESSAGES=de LANG=de ./test
....
> Где почитать про работу локали, использование gettext и т.п.?
У gettext есть своя документация - info gettext.
Ругается, видимо, на неправильное имя локали - нужно, скорее всего,
de_DE или de_DE.ISO8859-1. И, кстати, для gettext при выборе языка более
высокий приоритет имеет переменная LANGUAGE - это список языков (во всех
остальных может быть только одно значение). А вот по LC_CTYPE будет
определяться кодировка (gettext умеет перекодировать сообщения).
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2002-10-27 19:17 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-10-27 18:57 [devel] Нужна консультация по использованию perl-gettext Yura Zotov
2002-10-27 19:17 ` Sergey Vlasov
ALT Linux Team development discussions
This inbox may be cloned and mirrored by anyone:
git clone --mirror http://lore.altlinux.org/devel/0 devel/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 devel devel/ http://lore.altlinux.org/devel \
devel@altlinux.org devel@altlinux.ru devel@lists.altlinux.org devel@lists.altlinux.ru devel@linux.iplabs.ru mandrake-russian@linuxteam.iplabs.ru sisyphus@linuxteam.iplabs.ru
public-inbox-index devel
Example config snippet for mirrors.
Newsgroup available over NNTP:
nntp://lore.altlinux.org/org.altlinux.lists.devel
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git