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

Unable to set the Locale to Arabic #29

Closed
nithinkumarnk88 opened this issue Apr 25, 2021 · 2 comments
Closed

Unable to set the Locale to Arabic #29

nithinkumarnk88 opened this issue Apr 25, 2021 · 2 comments

Comments

@nithinkumarnk88
Copy link

HI,

I have integrated the AppLocale library and able to change to other languages like French, but I am not able to switch to Arabic.
The Kotlin code used to set Arabic is:
AppLocale.desiredLocale = Locale("ar")

After setting the locale, Im also using reword to trigger the change.

I have placed the Arabic strings in their respective values-ar strings.xml file
Please let me know if I am doing any mistake or does AppLocale support Arabic language?

Im also having one more issue:
When I change the language for example from English to French, the Appbar/toolbar title is not being changed as per the Locale. Im using Jetpack Navigation in my app. Titles for these destinations are set in the navigation.xml file using string resources.
The reword_version = "4.0.1"

Your feedback will be of great help. Thanks in advance.

@B3nedikt
Copy link
Owner

Actually any language should be supported, although I did not implement anything to deal with RTL out of the box, so you would need to update your layout manually here if needed. I might implement something here though, should be relatively easy. If you have a suggestion feel free to create a PR ;)

Please try to recreate your issue using the example app of this repository, just fork it and post a link to your fork in this issue.

I am using the Jetpack Navigation in my project as well, but I do not set the toolbar title with it, so I don't really know what happens here. I think it is easier to just put the Toolbar in your XMLs and set the title from there. If you find another solution feel free to post it here, and I might add it to this library. But I would in general recommend to use the Toolbar APIs from the appcompat library directly in your XML files if you can, as it simplifies a lot of issues in my experience.

@B3nedikt
Copy link
Owner

Closing due to inactivity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants