Petals
Petals copied to clipboard
Add language selection setting
I found no way to change app language.
Describe the solution you'd like You already have a translation platform just add a drop down menu to settings page.
Describe alternatives you've considered Idk change system language? I don't want to go that far.
Indeed. Currently the only way to change language is using the system.
Thanks for the suggestion!
How do you envision this? We have a language map with key as code (en) and value as label (English) and when you support a new language you update this?
And when you change the language from app settings you set this locale and recreate the activity?.
If this sounds good you can assign this to me!
Yes, @rubenquadros ! That's exactly what I was thinking. It's even what we are already doing here
https://github.com/LeoColman/Petals/blob/5ae0cecb486c1487695091e55f1ed3b6448c4dd3/app/src/androidTest/kotlin/br/com/colman/petals/ScreenshotTakerTest.kt#L59
I don't think there's a way to get all the locales available in an app, so a map with them is currently the way I go xD
How are the current translations handled? I would want to add a label and description for the language setting.
Translations are hosted on Weblate. https://hosted.weblate.org/engage/petals-app/
You can add your strings to values.xml and Weblate will take care of making it available for translations in other languages.
If you know any of them, feel free to also add to values-xx.xml of the given language
I have created a PR! Check it out and let me know if it works!