Projects > ObjAsm

Multilingual GUI

(1/7) > >>

Biterider:
Hi
Deploying an application for the international market mostly requires some kind of localization (https://en.wikipedia.org/wiki/Multilingual_User_Interface).

In recent years, several online services have started offering online translations into a large number of languages, more than what is normally supported by a regular application.
In this sense, it would be nice to use these services on-site to translate the text resources into the target language chosen by the user and store them locally, avoiding further use of the translator.
From what I've seen, using such services can be done using a relatively simple HTTP API set and a user account. This last point requires registration and payment.

I was wondering how Google's Chrome does this since it doesn't require a login? Does anyone have an idea how it works? Any link or working example?  :tongue:

Biterider

jj2007:
I've played with the idea, see attached multilingual editor, but with a slightly different approach:
- all GUI strings are handled in an Excel spreadsheet (attached)
- that implies getting translations for each column manually from Google or DeepL
- a copy gets saved in Utf8 format as GuiData.tab
- the tab file gets embedded as a resource
- the editor picks the language "on the fly" from that resource

You can test it using the Language menu entry.

Your version would go online to request the desired language for each GUI string, is that correct?

Biterider:
Hi

--- Quote from: jj2007 on November 13, 2022, 08:52:30 PM ---Your version would go online to request the desired language for each GUI string, is that correct?

--- End quote ---
Yes, but only if the provided localization is not available. If you cannot go online, a default language, in most cases English, will be selected and must always be present.

Biterider

Biterider:
Hi
I found something on GitHub easygoogletranslate
The author claims that he uses an "unofficial Google Translate API".
I extracted the relevant request from the Python code
https://translate.google.com/m?tl=sv&sl=en&q=Open%20File which, for example, translates "Open File" from English to Swedish

Available languages are listed here https://cloud.google.com/translate/docs/languages

Biterider

jj2007:
Try this link for a change. It works in a browser, but not as a direct download request, unfortunately. They have an API, though, but it requires authentication, i.e. your user would have to register. That is one reason why I would prefer the Excel spreadsheet approach mentioned above: a few kBytes more embedded in the executable, but no hassle with registration etc

Navigation

[0] Message Index

[#] Next page

Go to full version