Please enable JavaScript.
Coggle requires JavaScript to display documents.
I18n : Internationalization (How it Work (I18n module to access I18n API…
I18n : Internationalization
How it Work
make it easy to customize and extend everything for other languages
I18n module to access I18n API
The Public method for I18n API
translate
(t) : lookup text dictionary for translation
localize(l) : localize Date and Time objects to local formats
Setup
Configure the I18n Module
load all rb and yml file in config/locales dictionary
config locale : config.i18n.default_locale = "zh-TW"
file convention = file_name.locale(en).yml
config.i18n.load_path : can change load path using in config/application.rb
Managing the Locale across Requests
set with param
set with domain name
setting locale from user preferences
Internationalization and Localization
Passing Variable to Translations
write %{variable} in yml file
t('tag',var: value)
Organization Locale File
Translations Schema
Active Record Models
Action Mailer