Add built-in localization defaults for common languages#11
Conversation
Co-authored-by: markets <[email protected]>
markets
left a comment
There was a problem hiding this comment.
I think we should just automatically load localization files using the available_locales value. The currency and distance entries are only examples of what can be achieved, but no need to provide support, at least for now. Just keep them for testing. Btw, the sample file under the specs/* folder doesn't need to provide all the keys now, only the specific ones for testing custom scenarios (currency and distance).
…built-in locales Co-authored-by: markets <[email protected]>
I've implemented the changes as requested:
The changes are in commit |
|
Add also support for the following locales: chinese and japanese. |
Co-authored-by: markets <[email protected]>
I've added support for Chinese (:zh) and Japanese (:ja) locales. Both locale files include proper date/time formats, day and month names, and number formatting following each language's conventions. The README and all tests have been updated to include the new locales. Commit: 3a7e14f |
This PR implements localization defaults YAML files for common languages, similar to what rails-i18n provides. Users can now easily load pre-configured localization settings for multiple languages without having to create their own locale files.
Bug Fix
Also fixed a bug in number localization where the decimal separator wasn't being handled correctly for different locales. The localization code was trying to split numbers using the target locale's separator instead of the standard "." separator.
Fixes #9.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.