Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[web] The default language (system) is always english #320

Open
loviuz opened this issue Dec 24, 2024 · 6 comments
Open

[web] The default language (system) is always english #320

loviuz opened this issue Dec 24, 2024 · 6 comments
Labels
bug Something isn't working

Comments

@loviuz
Copy link

loviuz commented Dec 24, 2024

There is a way to add the default language running the software on docker? It could be useful to set the default locale like adding a LOCALE environvment variable on docker. If you tell me where to set the variable on the code i could try to add the env variable to docker. I don't know dart, but I can work on docker.

Thanks in advance!

@ferraridamiano
Copy link
Owner

This could be done by passing options to the run command but it is not implemented. But if you set the language in the settings it should not change (even if the container restarts). What is your usecase?

@loviuz
Copy link
Author

loviuz commented Dec 24, 2024

I would like to start ConverterNOW in italian because I would like to self-host it to italian people, but I do not want they have to change the language manually because some of them does not know english at all. For the moment, it is ok to manually pass some variables at any point 😅

@ferraridamiano
Copy link
Owner

The default setting is to use the system language of the browser. So if the PC language is Italian they should see the Italian translation of the app. This should be enough for your use case

@loviuz
Copy link
Author

loviuz commented Dec 24, 2024

It could be enough, but I have tried with 3 different browsers on 2 devices (Firefox and Chromium from desktop, Firefox on Android), but the default language is always english. I have tried on https://converter-now.web.app/. It could be nice if the web application could start with the browser default language.

@ferraridamiano ferraridamiano changed the title Default language [web] The default language is always english Dec 25, 2024
@ferraridamiano ferraridamiano changed the title [web] The default language is always english [web] The default language (system) is always english Dec 25, 2024
@ferraridamiano ferraridamiano added the bug Something isn't working label Dec 25, 2024
@ferraridamiano
Copy link
Owner

I renamed the title to highlight that there is a problem with the sistem language on web

I also investigated a possible solution to this. At the moment the app is using universal_io to get the device language. Unfortunately this package seems unmaintained. But a possible solution could come directly from the flutter team in the future. Please upvote that issue to prioritize the solution.

@ferraridamiano
Copy link
Owner

For your use case you can just change this line from 'en' to 'it' and manually recompile the app. Let me know if you have further issues

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants