I'm using a bootstrap-daterangepicker-rails gem in my app. I18n.locale can be chosen from English or Ukrainian on the header. I can't find the solution how to make a pop-up calendar be shown in that language which is chosen for the app.
My code in app/assets/javascripts/mini_scripts.js :
$('#daterange').datepicker({
format: "mm/yyyy",
startView: 1,
minViewMode: 1,
language: "uk"
});
It works great when language: "uk" or language: "en". But how to make it work accordingly to I18n.locale?
$('#daterange').datepicker({
format: "mm/yyyy",
startView: 1,
minViewMode: 1,
language: "<%= I18n.locale %>"
});
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.