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

[FEATURE PROPOSAL] Make translation easier by moving all strings to a json, ini or resx/resw file #141

Open
htcfreek opened this issue Jul 7, 2024 · 3 comments
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@htcfreek
Copy link

htcfreek commented Jul 7, 2024

Is your feature request related to a problem?

No, not related to a problem. But finding all the strings in the code is complicated.

Describe the solution you'd like

A set of external files (one per language) that contains the strings and some additional metadata (translators, is RTL language, language name and language id).

As file type ini, json or resx/resw might be good.

All places that require a translated string call a function that does the following:

  1. Check if a language file exist for the current Windows Ui language.
    • If yes: Use it.
    • If no: Fall back to English.
  2. Check the language file for the translated string.
    • If exists: Use it.
    • If not exists: Fall back to English.

Describe alternatives you've considered

Additional context

@htcfreek htcfreek added enhancement New feature or request good first issue Good for newcomers labels Jul 7, 2024
@htcfreek htcfreek changed the title [FEATURE PROPOSAL] Make translation easier by moving all string to a json or ini [FEATURE PROPOSAL] Make translation easier by moving all strings to a json, ini or resx/resw file Jul 7, 2024
@CodingWonders
Copy link
Owner

This looks like a good enhancement. I'm currently working on adding stub preferences for AppX packages but, meanwhile, I'm also looking at how other projects do that (since I know nothing about localization with RESX files)

@htcfreek
Copy link
Author

htcfreek commented Jul 8, 2024

This looks like a good enhancement. I'm currently working on adding stub preferences for AppX packages but, meanwhile, I'm also looking at how other projects do that (since I know nothing about localization with RESX files)

An AutoIt project (WhyNotWin11 from RCMahel) uses ini files.

Fir resx examples you might look at PowerToys or Window Terminal from Microsoft.

@CodingWonders
Copy link
Owner

I think I'll go with ResX files for this since it is "the .NET way". Currently, I'm looking at how ShareX does it, and I think it's going to be easy

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants