English 中文(简体)
如何利用“快车道”将一个地方的插座转化为另一个地方?
原标题:How to translate one string from one locale into another using FastGettext?

I use FastGettext in my Railways application.

在我的申请中,我需要把特别的插手翻译成每个单张<条码>。

如何做到这一点?

PS:我无法与I18n找到解决办法。 (见下文的答复)

问题回答

在我看来,你可以做与I18n一样的事情:

I18n.available_locales.each do |loc|
  # do something with...
  I18n.t(keypath, :locale => loc)
end




相关问题
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?

热门标签