Skip to content

Add localization#105

Open
nikaose wants to merge 1 commit into
Thorinair:masterfrom
nikaose:master
Open

Add localization#105
nikaose wants to merge 1 commit into
Thorinair:masterfrom
nikaose:master

Conversation

@nikaose
Copy link
Copy Markdown

@nikaose nikaose commented Apr 13, 2026

  • Implemented i18n.js module for handling language loading and translations in the application.
  • Created en.json for English translations including UI elements, tooltips, crops, and wiki links.
  • Created ru.json for Russian translations with similar structure and content.

- Created en.json for English translations including UI elements, tooltips, crops, and wiki links.
- Created ru.json for Russian translations with similar structure and content.
- Implemented i18n.js module for handling language loading and translations in the application.
@nikaose nikaose changed the title Adding localization Add localization Apr 13, 2026
@Thorinair
Copy link
Copy Markdown
Owner

Thorinair commented Apr 15, 2026

This looks simple enough. How does it behave in case something is not translated, like when adding new text lines? Does it just default to en?

@nikaose
Copy link
Copy Markdown
Author

nikaose commented Apr 15, 2026

This looks simple enough. How does it behave in case something is not translated, like when adding new text lines? Does it just default to en?

Right now the app defaults to English on init.
For missing keys in a non-English locale, it does not currently fall back to enper key - returns the key itself (e.g. ui.new_label), so missing translations are visible immediately. If you prefer, I can add a per-key English fallback
I'll also add that localization support is currently missing for the Change Log page, Help page, and, for example, for products with the jarType, kegType, dehydratorType, etc.

@nikaose
Copy link
Copy Markdown
Author

nikaose commented Apr 15, 2026

You can see the localization in action on the demo page: https://nikaose.github.io/Stardew-Profits/

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