Forum > Translations

My multilingual method for apps

<< < (4/4)

winni:
Hi!

There is another idea for a multilanguage app.

The idea is "stolen" from the UCSD compiler messages and was built in to the Ventura Publisher in a similar way.

Let the user select on of the languages for which a language file exists.

The language files contain 2 variables in one line:
an integer, a space as separator and a string - like

123 OK
124 cancel
125 continue
126 ....

And in your code you write something like
MyComponent.Caption := Msg (123);

Even with a small Integer you got room for 32.000 entries - so you can leave enough space inbetween for future enhancements.

And you can add (or delete) a language without going into  the code.

Plus: you need only one language file in the memory

Winni

Awkward:

--- Quote from: winni on April 07, 2020, 05:56:39 pm ---And in your code you write something like
MyComponent.Caption := Msg (123);

--- End quote ---

And you ready to remember all your numeric codes or to check your dictionary to find needed text?

bytebites:

--- Quote from: Awkward on April 07, 2020, 06:21:28 pm ---
--- Quote from: winni on April 07, 2020, 05:56:39 pm ---And in your code you write something like
MyComponent.Caption := Msg (123);

--- End quote ---

And you ready to remember all your numeric codes or to check your dictionary to find needed text?

--- End quote ---

123

winni:
Hi!

You just open a language file of a language, that you understand, in the IDE
and with one click you are there.

What helps is to group the messages by numbers, so let's say 100-199 are trvial button captions,
200-299 are questions for user interactions and so on.

Winni

Raul_ES:
Thanks for your suggestions.

Personally I believe that one language text file for each form containing a grid structure for translated words it's the easier way I've been able to think of. And easier to mantein.


regards

Navigation

[0] Message Index

[*] Previous page

Go to full version