We followed issue #376 on farmOS github, but the language part did not work.
We are a small team working on building an agritech application based on the farmOS client, and we recently ran into some problems with multi languages support.
According to issue #376 in farmOS-client github, we added a translation .js file under farmOS-client/src/core/store/l10n/translation, and then, in farmOS-client/src/core/store/l10n/module.js file, we added the following to ‘languages’ in ‘state’.
After that, the app was able to show the ‘select language’ option in the menu bar, however, after clicking a different language (we had german and portuguese), the app did not change language at all. We tried to log into an account and connect to a server, but still it did not work.
We could not find any more information about this issue, so we wonder if there’s more modification that needs to be done in order to make the language change work.
This is probably a question for @jgaehring - and FWIW the localization features in Field Kit v1.x were experimental. All future work is being done for Field Kit v2.x. If you’re building an application on top of Field Kit you will want to familiarize yourself with the changes that are happening in 2.x of farmOS and Field Kit. Happy to chat about that in the chat room, or if you want to hop on the next monthly call we might be able to give you an overview, based on what you’re doing.
Regarding this issue specifically, perhaps a relevant question is: do you have the languages installed on the server side, and are they enabled as the default language for the user you are authenticating as on the Field Kit side?
My understanding (correct me if I’m wrong @jgaehring ) is that Field Kit will ask the server for the user’s default language, and then will use that to select the language to use in the Field Kit UI. So there is a server-side dependency, in addition to any work you’ve done in the client code.
Yea, I definitely want to echo all of this. As of now, there won’t be any real concerted efforts to improve the l10n module in Field Kit 1.x at all, unless it’s a minor bug with a super quick fix. But I’m very open to working with you on improving things for 2.0, or if you want to work on improvements to 1.x yourself, walking you through the system as it is now and answering any questions you might have. Like Mike said, the next monthly call would be a great opportunity to discuss it. If you think you can attend, feel free to add this issue to the agenda.