flat assembler
Message board for the users of flat assembler.

Index > Tutorials and Examples > [fasmg] A menu in 12 languages.

Author
Thread Post new topic Reply to topic
bitRAKE



Joined: 21 Jul 2003
Posts: 3908
Location: vpcmipstrm
bitRAKE 31 Mar 2022, 08:17
Tale is the Afrikaans word for languages, and in English is an imaginatively recounted story. Due to my naiveté in both spoken/written languages and prior work in this area programmatically; I'm just going to start with the simplest methods I can think of.

I only know English, so the translation is via the internet.
(Checked some of them with google translate.)

Currently, the demo menu builds in 12 languages:

German
English
Finnish
French
Indonesian
Italian
Japanese
Korean
Polish
Portuguese
Russian
Chinese

Obviously, other languages or refinements are welcome.


Description:
Download
Filename: fasmg-In-Tale.zip
Filesize: 11.96 KB
Downloaded: 425 Time(s)


_________________
¯\(°_o)/¯ “languages are not safe - uses can be” Bjarne Stroustrup
Post 31 Mar 2022, 08:17
View user's profile Send private message Visit poster's website Reply with quote
bitRAKE



Joined: 21 Jul 2003
Posts: 3908
Location: vpcmipstrm
bitRAKE 01 May 2023, 17:38
GPT-4 suggested that I add some additional languages (purely based on population metrics):

Bengali
Hindi

https://github.com/bitRAKE/fasmg-umbrella/tree/main/examples/in-tale

Next, I will add some right-to-left languages.

FYI: GPT-4 was able to grok the file and only replace the text in quotes with translations. There was no need to change the produced text. This included changing the language constant symbol at the start of the file, and not changing the quoted text referencing key-combinations. Fine tuning consisted of advising that the ampersands probably no longer coincided with valid letters (which I could be incorrect about, but GPT-4 did remove them).

_________________
¯\(°_o)/¯ “languages are not safe - uses can be” Bjarne Stroustrup
Post 01 May 2023, 17:38
View user's profile Send private message Visit poster's website Reply with quote
bitRAKE



Joined: 21 Jul 2003
Posts: 3908
Location: vpcmipstrm
bitRAKE 12 May 2023, 07:31
The above technique works well because it's the only resource in the executable. Windows isn't given another option - it doesn't matter what the user/system settings are.

Maybe you work in a more complex environment and want to respect Windows settings. This can be done by having multiple resources with the same ID, and windows will select those closely matching the user/system's preferences.

I would say this is the next easiest method to support multiple language. The downside is memory bloat - all the resources in one executable. Without changing the system/user settings, alternate language preferences can be tested with:
Code:
SetThreadUILanguage LANG_RUSSIAN or SUBLANG_DEFAULT    
... at the start of program.


Description: Multiple languages in one executable.
Download
Filename: example.zip
Filesize: 8.5 KB
Downloaded: 151 Time(s)


_________________
¯\(°_o)/¯ “languages are not safe - uses can be” Bjarne Stroustrup
Post 12 May 2023, 07:31
View user's profile Send private message Visit poster's website Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.