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

[Feat] Use app-provided Locale #33

Open
Sherlouk opened this issue Oct 15, 2022 · 5 comments
Open

[Feat] Use app-provided Locale #33

Sherlouk opened this issue Oct 15, 2022 · 5 comments
Assignees
Labels
Feature Request New functionality the app doesn't provide yet Size: Medium Probably less than 1 month of work

Comments

@Sherlouk
Copy link

Problem Statement

Some applications (my app 😛 ) provides the user the option to choose which language it wants the app in, as opposed to relying solely on the system setting. Currently, ReMafoX's generated enum file uses static variables and system APIs which means only the device language is supported.

Suggested Solution

It may be possible to (optionally, using a new value in the ReMafoX config) add a function to the generated enum. This function would take a Locale override which would take priority over the device setting.

Additional Considerations

@Jeehut
Copy link
Member

Jeehut commented Oct 15, 2022

Thank you for requesting this feature!

I'm open to implement a solution for this, so please make sure to leave an upvote so I can prioritize this feature accordingly.

Having that said: Have you considered pointing the user to the new system setting available since iOS 15, I believe, where the user can change the language of an app in the Settings app on an app-level? I know that this is not exactly the same as changing it right within the app, but it's not too far off either. Just asking in case you weren't aware of this new feature.

@Jeehut Jeehut self-assigned this Oct 15, 2022
@Jeehut Jeehut added Feature Request New functionality the app doesn't provide yet Size: Medium Probably less than 1 month of work labels Oct 15, 2022
@Sherlouk
Copy link
Author

Having that said: Have you considered pointing the user to the new system setting available since iOS 15, I believe, where the user can change the language of an app in the Settings app on an app-level? I know that this is not exactly the same as changing it right within the app, but it's not too far off either. Just asking in case you weren't aware of this new feature.

I'm aware of the Per-App settings for accessibility options, such as dynamic text size. I wasn't aware that you could change locale per app? Where is this preference?

@Jeehut
Copy link
Member

Jeehut commented Oct 15, 2022

@Sherlouk Just open the Settings app, scroll down to your app's entry and select "Language".

@Sherlouk
Copy link
Author

Today I learned! Thanks for sharing Cihat.

That lowers the priority for this feature for me. Still a nice to have (as I do prefer to have the option within the app) but not as critical.

@Jeehut
Copy link
Member

Jeehut commented Oct 15, 2022

@Sherlouk Glad I could help!

By the way, to show the settings of your app programmatically from within your app, you can call:

UIApplication.shared.open(URL(string: UIApplication.openSettingsURLString)!)

See also the related Apple documentation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Request New functionality the app doesn't provide yet Size: Medium Probably less than 1 month of work
Projects
None yet
Development

No branches or pull requests

2 participants