Multi-Language support in C# is controlled by the following 2 properties:
Thread.CurrentThread.CurrentCulture
Thread.CurrentThread.CurrentUICulture
which you can either query or set at runtime:
Thread.CurrentThread.CurrentCulture = new CultureInfo(options.LanguageSelected);
Thread.CurrentThread.CurrentUICulture = new CultureInfo(options.LanguageSelected);
Reference:
Edi/App.xaml.cs at master · Dirkster99/Edi · GitHub[
^]
The referenced project uses this information to find the right *.resx file for the best language match a user might be looking for.
How you use this in a database table is completely up to you and depends and the other all structure (about which you are telling nothing so I am left to guessing). But simply put, if you jsut want to retrieve strings from a table, why not having a table with strings like this:
Create Table MyStrings
(
id int not null,
mystring varchar(255) not null,
langid int not null
)
where the langid identifies the language of a given string and the id itself should be unique to identify each string - you can then use this structure to find strings you have not translated, yet, or determine if there is a translation at all.
You should of course always have all required strings available in a base language (eg. English) at the very least. The best way of ensuring this might be unit testing against it...