Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I18n support #95

Open
doabit opened this issue Oct 16, 2014 · 4 comments
Open

I18n support #95

doabit opened this issue Oct 16, 2014 · 4 comments
Labels

Comments

@doabit
Copy link

doabit commented Oct 16, 2014

Would Upmin Admin support i18n?

@joncalhoun
Copy link
Member

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?

@doabit
Copy link
Author

doabit commented Oct 26, 2014

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")

@mibamur
Copy link

mibamur commented Nov 10, 2014

Hello to everyone.

My point of view.

1) translation

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"
2) locales

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'

@mibamur
Copy link

mibamur commented Nov 10, 2014

So, I can help and do it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants