Skip to content

Adding translation based off Language ID#263

Open
Jakkret wants to merge 9 commits into
DiscordMessenger:masterfrom
Jakkret:master
Open

Adding translation based off Language ID#263
Jakkret wants to merge 9 commits into
DiscordMessenger:masterfrom
Jakkret:master

Conversation

@Jakkret

@Jakkret Jakkret commented Jun 5, 2026

Copy link
Copy Markdown

based off #260 i managed to make it work, though its best to check my code, im skeptical in few places.

What has been added:

  • Loading language only by checking if language is in the resource.rc
  • Restarting the instance after changing the language (skeptical about backwards compatibility with NT 3.51)
  • saving language ID to settings.json
  • Added "Languages" Tab in Preferences

What works, but could be improved:

  • listing available languages from resource instead of hardcoding them

what can possibly bug:

  • checkbox about using the system language by default.

if i made some mistakes, let me know. I wanna learn aswell

@Jakkret

Jakkret commented Jun 5, 2026

Copy link
Copy Markdown
Author

I didn't add the Polish translation so far, because i'll work on it later — if you'd like to test it, you can copy what i deleted from one of the commits 👍

Comment thread src/windows/Main.cpp Outdated
Comment thread src/windows/OptionsDialog.cpp Outdated
@Jakkret

Jakkret commented Jun 5, 2026

Copy link
Copy Markdown
Author

i will convert this pr to draft, and i'll try to fix these two things

@Jakkret Jakkret marked this pull request as draft June 5, 2026 15:01
@Jakkret

Jakkret commented Jun 5, 2026

Copy link
Copy Markdown
Author

@TomGoodIdea could you review it, please?

@TomGoodIdea

Copy link
Copy Markdown
Contributor

Should be alright in terms of compatibility now.

@Jakkret

Jakkret commented Jun 5, 2026

Copy link
Copy Markdown
Author

what about GetSystemDefaultLangID()?

@Jakkret Jakkret marked this pull request as ready for review June 5, 2026 16:12
@TomGoodIdea

Copy link
Copy Markdown
Contributor

As far as I know, it is present in NT 3.51.

@Jakkret

Jakkret commented Jun 5, 2026

Copy link
Copy Markdown
Author

alright, thank you for reviewing

Comment thread src/windows/Main.cpp

// compatibility checking
HMODULE h = GetModuleHandle(TEXT("kernel32.dll"));
pSetThreadUILanguage fnSetUILanguage = (pSetThreadUILanguage)GetProcAddress(h, "SetThreadUILanguage");

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not your fault, but if I merge the PR, I'll move this to MWAS

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah i understand that, i looked and saw simillar things like that. No worries

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.

3 participants