-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Translations
Pick your locale here
See https://github.com/plataformatec/devise/wiki/I18n and https://github.com/tigrish/devise-i18n
Copy https://github.com/sferik/rails_admin/blob/master/config/locales/rails_admin.en.yml to your config/locales
directory and adapt it to your needs.
You need to manually import Flatpickr locales you want to use:
app/javascript/packs/rails_admin.js
or app/javascript/rails_admin.js
import "rails_admin/src/rails_admin/base";
import "../stylesheets/rails_admin.scss";
+ import "flatpickr/dist/l10n/fr"; // individually
+ import "flatpickr/dist/l10n/index"; // or all at once
In addition to 'Webpack/Webpacker setup' above, you also need to adjust config/importmap.rails_admin.rb
so the browser can pick up the Flatpickr locale correctly.
pin "bootstrap", to: "https://ga.jspm.io/npm:[email protected]/dist/js/bootstrap.esm.js"
pin "flatpickr", to: "https://ga.jspm.io/npm:[email protected]/dist/esm/index.js"
+pin "flatpickr/dist/l10n/fr", to: "https://ga.jspm.io/npm:[email protected]/dist/l10n/fr.js"
pin "jquery", to: "https://ga.jspm.io/npm:[email protected]/dist/jquery.js"
All supported locales are loaded by default, just changing locale value is enough.
You can pick your locales or contribute in translation here: https://www.localeapp.com/projects/905
Make sure your existing locales do not have admin: key under :en, :es, :de etc. You will get translation missing warning then
Community sourced translations:
-
Add your own (create a gist first)
You can find old included translations here: