English 中文(简体)
cakephp 多语言设置
原标题:cakephp multilanguage setup

Anyone with a good knowledge of multilanguage setup for cake 1.3?

今天,我正在使用一个;一个地方/北方/LC_MESSAGES/default.po。

标题:

msgid ""
msgstr ""
"Project-Id-Version: 2
"
"POT-Creation-Date: 2012-04-17 20:37+0200
"
"PO-Revision-Date: 2012-04-17 20:39+0100
"
"Last-Translator: 
"
"Language-Team: 
"
"MIME-Version: 1.0
"
"Content-Type: text/plain; charset=UTF-8
"
"Content-Transfer-Encoding: 8bit
"
"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;
"

内部的定期语言插播。

在boot间装置中。 php =>Configure:write ( Config. Language , nor );

simple strings like this;

msgid "Norwegian"
msgstr "Norsk"

如果我使用复数(时间帮助者)

msgid "second"
msgid_plural "seconds"
msgstr[0] "sekund"
msgstr[1] "sekunder"

这一切都没有翻译!

我不敢肯定会做些什么,因为我手工地在编辑中编造了.po文档(不使用ole或任何东西进行提取)。

Something else I need to include to have it translated correctly? Planning to use 2 languages for the site in the future, setting correct locale depending on what domain is visited. example: domain.com => eng & domain.no => no

感谢对此有任何了解。

- To

最佳回答

Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;

This line is the culprit. Change INTEGER to 1 and EXPRESSION to 0. Then msgstr[0] will contain your singular form and msgstr[1] will contain the plural form.

问题回答

暂无回答




相关问题
How does gettext handle dynamic content?

In php (or maybe gettext in general), what does gettext do when it sees a variable to dynamic content? I have 2 cases in mind. 1) Let s say I have <?=$user1?> poked John <?=$user2?>. ...

Explain the Need for Mutexes in Locales, Please

Reading the question Why doesn’t C++ STL support atoi(const string& ) like functions?, I encountered a comment which warned that GCC (at least) has a bug that can slow down multi-threaded ...

How does Vistalizer work

How does Vistalizer manage to override the language limit in Windows Vista Home edition. Which api s does it use to allow installation of Multiple language packages.

Localized exceptions (within a Struts2 app)

I am developing a Struts 2 application with support for multiple languages. If one of the domain objects needs to throw an exception, how can it do so in such a way that the error message is no ...

Rails Globalize plugin help

Has anyone gotten the Globalize plugin to work Rails 2.3.2 or later? If so, could you direct me to some useful info?

热门标签