Skip to content

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

Merged
Samillion merged 3 commits into
Samillion:mainfrom
nekoxuee:feat/locales-integration
Oct 20, 2024
Merged

Feat: Add locales as an optional separate file with english fallback#61
Samillion merged 3 commits into
Samillion:mainfrom
nekoxuee:feat/locales-integration

Conversation

@nekoxuee
Copy link
Copy Markdown
Contributor

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
Copy Markdown
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