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

Feat: Add locales as an optional separate file with english fallback #61

Merged
merged 3 commits into from
Oct 20, 2024
Merged

Feat: Add locales as an optional separate file with english fallback #61

merged 3 commits into from
Oct 20, 2024

Conversation

Xurdejl
Copy link
Contributor

@Xurdejl Xurdejl commented Oct 20, 2024

This PR adds support for an optional modernz-locale.lua file which contains all the locales, so users can now easily switch between languages using the language option in modernz.conf.

Changes

  • Separate locales file modernz-locale.lua
  • Defaults to English when not using the locales file so it works just like before
  • Missing strings will fall back to English

- Implemented functionality to load locales from a separate modernz-locale.lua file.
- Maintained existing English default behavior for users without locales.
- Added fallback mechanism for missing locale strings.
@Samillion
Copy link
Owner

Absolutely beautiful, this makes locale integration seamless. Thank you very much.

@Samillion Samillion merged commit bc250fb into Samillion:main Oct 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants