在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):karmi/rails_i18n_demo_app开源软件地址(OpenSource Url):https://github.com/karmi/rails_i18n_demo_app开源编程语言(OpenSource Language):Ruby 99.5%开源软件介绍(OpenSource Introduction):¶ ↑Demo application for Rails internationalization APISimple & minimal Rails application to test the internationalization and localization features of Rails 2.2 and later. I keep this application up-to-date with my current contract, so you can follow the commits for (possible) API changes and gotchas. It shows how you can override Rails default locale/language ('en') in views, in ActiveRecord validation messages, etc. It shows you how to test internationalization features. Tries to set some reasonable pattern to load translation files and set locale either from request domain (.com, .de, etc) or request params. Do not ever set locale to cookie or session, as it breaks basic assumptions about web. Read this discussion for context: groups.google.com/group/rails-i18n/browse_thread/thread/de73dbd1309ae640/ The application includes translation file for Czech language so you can easily roll your own Spanish, German, Polish, etc version just by duplicating the file, renaming it and changing the translation strings. After server restart you should see your language in language bar at the top of the page. ¶ ↑Installation & Requirements
¶ ↑About setting the locale from the request domainUsually the most sane approach to setting locale/language version of the application is from the domain: The 127.0.0.1 application.com 127.0.0.1 application.cz Then just load your application as usual at ¶ ↑About Rails i18nSee guide at guides.rails.info/i18n.html See www.rails-i18n.org for more info and get in touch at groups.google.com/group/rails-i18n |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论