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

Document wxUILocale::UseLocaleName() #23972

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

utelle
Copy link
Contributor

@utelle utelle commented Oct 16, 2023

Under certain circumstances it can make sense to use a locale other than the default user locale.

One example would be, if an application wants to use a UI translation with an RTL language (like Arabic) on a non-RTL system. This wouldn't work with the default locale, because the layout direction would be wrong.

Currently setting a non-default locale can already be achieved via wxLocale anyway. Therefore wxUILocale::UseLocaleName() should be made public, to allow for less side effects than using wxLocale.

Under certain circumstances it can make sense to use a locale other than the default user locale.

One example would be, if an application wants to use a UI translation with an RTL language (like Arabic) on a non-RTL system. This wouldn't work with the default locale, because the layout direction would be wrong.

Currently setting a non-default locale can already be achieved via wxLocale anyway. Therefore wxUILocale::UseLocaleName() should be made public, to allow for less side effects than using wxLocale.
@wh11204
Copy link
Contributor

wh11204 commented Oct 20, 2023

You should remove also this comment from uilocale.h:

// This is a compatibility function used by wxWidgets itself, don't use it
// in the new code.

@wh11204
Copy link
Contributor

wh11204 commented Nov 17, 2023

I use this method in my applications because IMHO changing the language should change the locale accordingly. An english user in a spanish computer may prefer using the program in english with the english locale, not with the spanish one.

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

Successfully merging this pull request may close these issues.

None yet

2 participants