Internationalization support
Created by: Andres G. Aragoneses
geewallet should be able to be translated to many languages, right now there's only English.
WRT how to do this, I don't like the official approach in the Xamarin docs (https://docs.microsoft.com/en-us/xamarin/xamarin-forms/app-fundamentals/localization/text?tabs=macos & https://developer.xamarin.com/samples/xamarin-forms/UsingResxLocalization/) because you have to change resource files even for the English language. I like this more: https://doumer.me/multilingual-xamarin-forms-app/
Imported comments:
By Andres G. Aragoneses on 2019-04-01T07:45:29.502Z
Sounds good.
By Andrei Misiukevich on 2019-04-01T07:38:49.601Z
@knocte yeah I think, we can combine my and your approaches: XAML markup extension + JSON files or dictionaries
By Andres G. Aragoneses on 2019-04-01T02:47:10.232Z
Ok, in this case we can make keys as english strings in JSON or Map ..
Just want to make sure we can have English strings written as immediate values in .fs and .xaml.fs files. (And later run command line tools to generate resource or JSON files for the other languages.)
By Andrei Misiukevich on 2019-03-29T09:06:55.459Z
hmmm.. interesting approach, allocate memory every text request.
Ok, in this case we can make keys as english strings in JSON or Map ..
By Andres G. Aragoneses on 2019-03-29T08:43:54.613Z
Then re-read the description of the issue again ;)
By Andrei Misiukevich on 2019-03-29T08:38:23.567Z
@knocte keys chosen by the developer i guess
By Andres G. Aragoneses on 2019-03-29T07:01:39.744Z
@AndreiMisiukevich regarding your proposal, would those keys be the english strings or just keys chosen by the developer?
By Andrei Misiukevich on 2019-03-28T14:19:08.426Z
i can suggest next approach
- create localization files, put all strings in the folder as json files
/locale/EN.json /locale/ES.json /locale/BY.json etc.
particular file (EN.json e.g.) will be:
{
"key1" : "Value1",
"key2" : "Value2",
"key3" : "Value3",
}
And the same keys for all other locales.
- generate F# class and deserialize strings there via JsonConvert.PopulateObject
By Andres G. Aragoneses on 2019-02-11T07:56:57.827Z
changed the description