Welcome! Log In Create A New Profile


Multilingual database

Posted by pietvanz 
Multilingual database
January 02, 2022 11:34AM

First of all: happy new year. Live well and prosper!
Now to the topic:

Of course I'm familiar with all the more or less useful features to make the GUI multilingual.
But what about the database?
Especially in Webdev I'm using lots of content stored in the database.
In the WX products I'm actually missing something like a multilingual database link, so you can link stuff to different file items based on language.
Has anyone come up with a clever solution the cope with this and is willing to share?
Or do we just have to skip file file-links and do it all by programming?

Best regards,
Re: Multilingual database
January 02, 2022 12:38PM
everywhere I need a multilingual string in my DB, I replace the field by a MESSAGE GUID (getGUiD with rough option)
Then I have a message file in which each record has:
- unique GUID as identifier (not the same one)
- Language code (nation())
- MESSAGE GUID (the one stored in the main file)
- the real string, in the matching language

and I have a composite key with MESSAGE GUID+Language code

so in queries, I can link on the MESSAGE GUID and add a condition on the language code to get what I need, or I can use a hfilter, of course.
Re: Multilingual database
January 02, 2022 12:39PM
By the way, I didn't invent that, I just followed Fabrice's advices on the subject
Re: Multilingual database
January 02, 2022 12:52PM
The best solutions are the simple ones thumbs up

Your Email:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.