Created
April 18, 2017 18:03
-
-
Save mamantoha/5c10a153dd0e4aa393583374f4b607a9 to your computer and use it in GitHub Desktop.
Ukrainian language support for Ruby on Rails
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# config/locales/defaults/uk.rb | |
{ | |
uk: { | |
date: { | |
# In Ukrainian month name with day and standalone day are different | |
month_names: lambda do |key, options| | |
if options[:format] && options[:format] =~ /%-?d %B/ | |
:'date.month_names_with_day' | |
else | |
:'date.month_names_standalone' | |
end | |
end | |
} | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# config/locales/defaults/uk.yml | |
uk: | |
date: | |
formats: | |
full: "%-d %B, %Y - %A" | |
full_month: "%B, %Y" | |
full_day: "%-d %B, %Y" | |
week_abbr: "%a" | |
month_names_with_day: | |
- | |
- січня | |
- лютого | |
- березня | |
- квітня | |
- травня | |
- червня | |
- липня | |
- серпня | |
- вересня | |
- жовтня | |
- листопада | |
- грудня | |
month_names_standalone: | |
- | |
- Січень | |
- Лютий | |
- Березень | |
- Квітень | |
- Травень | |
- Червень | |
- Липень | |
- Серпень | |
- Вересень | |
- Жовтень | |
- Листопад | |
- Грудень |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment