packwiz / packwiz-installer

An installer for packwiz modpacks, with automatic auto-updating and optional mods! Works well with MultiMC and on servers.
https://packwiz.infra.link/
MIT License
46 stars 21 forks source link

Internationalization & Localization support #65

Open 3TUSK opened 11 months ago

3TUSK commented 11 months ago

Title.

This idea comes into my mind when I see the prompt dialog that asks me to choose one of three: update, keep current or cancel launch.

Ideally, this window should not pop up when the pack is stable - I saw that window because I was using our nightly builds, which updates periodically. Still, having a translated GUI makes our audiences easier to understand what is going on.
Further, there is also this "Optional mods..." button. For now, we did not make a use of it. Should we make a use of it in the future, it would be nice to see a translated version here.

To determine the language to use, you can use either System.getProperty("user.language") or java.util.Locale.getDefault(). This queries the system locale, which should be your best bet.

You can consider leveraging java.util.ResourceBundle to implement language files. AFAIK, Fabric loader and Fabric-installer use it.

comp500 commented 11 months ago

(related issue: https://github.com/packwiz/packwiz/issues/22) Do you recommend a localisation platform (e.g. Weblate/Crowdin/etc) to manage these translations? I would be happy to implement i18n support, although it may take a while to convert the existing hardcoded strings (particularly for the CLI, though that isn't as important as packwiz-installer).

3TUSK commented 11 months ago

Do you recommend a localisation platform (e.g. Weblate/Crowdin/etc) to manage these translations?

I won't recommend a dedicated platform until there are too many languages, or unless you don't want translation PRs to clutter your git history.

I don't have a particular platform to recommend:

zbx1425 commented 5 months ago

Oof, I should've checked the issue list before jumping into #73 But anyways #73 is about converting some of these existing hardcoded strings into language files, albeit probably not very nicely; as for online platform, IMO there'd always be the option of allowing people to submit, but only merge in the contents manually.