L10n multi Language problem

Hello,

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.

Thanks,
Liam

2 Likes

Hi @liam - welcome to the farmOS forum!

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.

1 Like

That is correct.

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.

For now, I’m going to close Guide to Translating Field Kit ⚠️ EXPERIMENTAL!! · Issue #376 · farmOS/field-kit · GitHub and update the “Update” to make it clear this won’t be supported in 1.x going forward.

1 Like

Thanks for your replies, that makes sense since I’m using version 1.0 instead of 2.0, and I’ve now decided to give up using l10n and try to switch languages using other methods instead.

1 Like