Open 1sra3l opened 3 years ago
I was thinking to create a file with a list of language files that will be loaded in a struct and just set text to elements, but as it has tr support I will look at tr and gettext, it's probably easier than the way I was thinking. I never made translation before, so I dont know if the way I was thinking is good.
From my experiences gettext is pretty widespread. When checking out tr
it seemed like a nice simple macro. You need to initialize it to the directory where things are stored.
Two options here:
tr_init!(directory)
instead of figuring out where Windows stores them. Either solution is fine to me.
We can easily translate the FLUID side of things because of the effort of Mr Alyousef via the
tr
crate. Inside our code it is easy to quickly implement. Simple replace all strings to translate astr!("item")
ORtr!("context_for_reused_word"=>"item")
This will be pretty easy to do in the code part, I think.We could probably just use the command line tool
gettext
since this is based on gettext anyhow. Have you ever set up for translations before? If you are already setup, and know what to do, feel free to tackle this first!We will need to think about how to cross platform directory search/store the locale files, though
Also, ALL error messages should be in English, that way if it is used in a language neither of us know, it will be a message we can both read!