Open doabit opened 9 years ago
Currently it does not. What is your use case for this?
Specifically, do you intend to have multiple languages available at once, or just one language and you want to change that in a config or something similar?
I want to custom some messages. https://github.com/upmin/upmin-admin-ruby/blob/master/app/views/upmin/models/dashboard.html.haml#L7, i think it should like I18n.t("upimin-admin..embarrassing")
applicaton.rb
config.i18n.default_locale = :ru
config/locales/ru.bootstrap.yml
# Sample localization file.
ru:
helpers:
actions: "Действия"
links:
back: "Назад"
cancel: "Отмена"
confirm: "Уверены?"
destroy: "Удалить"
new: "Создать"
edit: "Изменить"
save: "Сохранить"
show: "Смотреть"
titles:
edit: "Изменить %{model}"
save: "Сохранить %{model}"
new: "Создать %{model}"
delete: "Удалить %{model}"
select:
prompt: "Выберите: "
submit:
create: "Создать %{model}"
submit: "Сохранить %{model}"
update: "Сохранить %{model}"
in the view (haml example)
.col-sm-4
= f.submit t('.save', :default => t("helpers.links.save")), :class => "btn btn-primary"
date (format view) , time (24 format or not) and something else will changes from Locale to Locale
PS Instrument helps solve this question fully:
gem 'rails-i18n', github: 'svenfuchs/rails-i18n', branch: 'master'
gem "i18n-js", github: "fnando/i18n-js", branch: 'master'
gem 'i18n-tasks', github: 'glebm/i18n-tasks'
So, I can help and do it.
Would Upmin Admin support i18n?