1: 修改启动为ruby script/server 默认为开发环境, config.cache_classes = true改false,就能成为:"live" apps
= Localization Plugin for Rails
This plugin provides a simple, gettext-like method to
provide localizations.
该插件提供一个简单的、gettext-like方法来实现本地化
== Features 功能
* Any number of languages or locales 任意数量的语言或本地化
* Simple method to defines singluar/plural translations 定义单/复数的简单方法
* Can use lambdas to provide Ruby-code based dynamic translations 可以用 lambdas来支持基于Ruby-code翻译
* Customizable for different instances of the application 定制不同的应用实例
Localization.lang = 'zh_CN' # or 'fr' 这个放在custom_envoirnment.rb中不行,一定要放在account_controller.rb才行
如何在新建用户中能选择语言呢?在account/_form.rhtml
<%= @f.select :language, { "English" => 'en_EN', "Chinese" => 'zh_CN' , "Italiano" => 'it_IT' } %>
model 中又是如何翻译的呢?
cssformbulider 支持CssBuilder.translate_as_gettext
如对本文有疑问,请提交到交流论坛,广大热心网友会为你解答!! 点击进入论坛