Clarify the continued use of wxLocale
CMake builds / ${{ matrix.name }} (-DCMAKE_C_COMPILER=cl.exe -DCMAKE_CXX_COMPILER=cl.exe, Ninja, SOME, CONSOLE_ONLY, Windows MSVC, 1, windows-latest) (push) Waiting to run
CMake builds / ${{ matrix.name }} (-DCMAKE_SYSTEM_NAME=iOS -DCMAKE_FIND_ROOT_PATH=/usr/local -DCMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_ALLOWED=NO, Xcode, OFF, OFF, macOS 14 wxIOS, macos-14) (push) Waiting to run
CMake builds / ${{ matrix.name }} (Unix Makefiles, ALL, Ubuntu 22.04 wxGTK 3, ubuntu-22.04) (push) Waiting to run
CMake builds / ${{ matrix.name }} (Xcode, macOS 14 wxOSX, macos-14) (push) Waiting to run
Mac builds / ${{ matrix.name }} (arm64, --with-cxx=14 --enable-universal_binary=arm64,x86_64 --disable-shared --disable-debug --enable-optimise, wxMac Universal C++14, self-hosted) (push) Waiting to run
Mac builds / ${{ matrix.name }} (arm64, wxMac ARM with ASAN, self-hosted, true) (push) Waiting to run
Mac builds / ${{ matrix.name }} (true, x86_64, PKG_CONFIG_LIBDIR=/dev/null, --with-osx_iphone --enable-monolithic --disable-sys-libs --host=i686-apple-darwin_sim --build=x86_64-apple-darwin17.7.0, wxiOS, macos-14, true, true, iphonesimulator) (push) Waiting to run
Mac builds / ${{ matrix.name }} (x86_64, --disable-sys-libs, wxMac macOS 14, macos-14) (push) Waiting to run
Mac builds / ${{ matrix.name }} (x86_64, --with-cxx=17 --with-macosx-version-min=10.12 --enable-debug, wxMac Intel C++17, self-hosted) (push) Waiting to run
Mac Xcode builds / ${{ matrix.name }} (x86_64, Debug, generic/platform=iOS, iOS static Debug, build/osx/wxiphone.xcodeproj, macos-latest, static) (push) Waiting to run
Mac Xcode builds / ${{ matrix.name }} (x86_64, Release, generic/platform=iOS Simulator, iOS Simulator static, samples/minimal/minimal_iphone.xcodeproj, macos-latest, app-static) (push) Waiting to run
Mac Xcode builds / ${{ matrix.name }} (x86_64, Release, generic/platform=macOS, macOS dynamic Release, samples/minimal/minimal_cocoa.xcodeproj, self-hosted, app-dynamic) (push) Waiting to run
MSW builds / wxMSW vs${{ matrix.vsversion }} ${{ matrix.configuration }} ${{ matrix.platform }} (DLL Debug, x64, true, 2022) (push) Waiting to run
MSW builds / wxMSW vs${{ matrix.vsversion }} ${{ matrix.configuration }} ${{ matrix.platform }} (DLL Release, x64, 2019) (push) Waiting to run
MSW builds / wxMSW vs${{ matrix.vsversion }} ${{ matrix.configuration }} ${{ matrix.platform }} (Debug, Win32, 2019) (push) Waiting to run
MSW builds / wxMSW vs${{ matrix.vsversion }} ${{ matrix.configuration }} ${{ matrix.platform }} (Release, arm64, 2022) (push) Waiting to run
MSW builds / msw-msys2-clang (push) Waiting to run
MSW cross-builds / ${{ matrix.name }} (--disable-compat32, testing, wxMSW 64 bits) (push) Waiting to run
MSW cross-builds / ${{ matrix.name }} (--enable-universal --disable-compat32 --disable-debug --disable-optimise, testing, true, wxMSW/Univ) (push) Waiting to run
MSW cross-builds / ${{ matrix.name }} (stable, wxMSW 32 bits, i686-w64-mingw32) (push) Waiting to run
Code Checks / Check Spelling (push) Waiting to run
Code Checks / Check Whitespace (push) Waiting to run
Code Checks / Check Mixed EOL (push) Waiting to run
Code Checks / Check C++ Style (push) Waiting to run
Update Documentation / Update Online Documentation (push) Waiting to run

Explain when it should still be used.

See #24785.

Closes #25035.

Closes #25051.
This commit is contained in:
Blake-Madden
2025-01-08 03:01:33 +01:00
committed by Vadim Zeitlin
parent 50da7c0297
commit cac1fc8e67
2 changed files with 10 additions and 2 deletions
+2 -1
View File
@@ -287,7 +287,8 @@ enum wxLocaleForm
11.0 and 12.2 inclusive are affected by a bug when changing C locale can
break display of the application menus. Because of this, it is
recommended to use wxUILocale instead of this class for the
applications targeting macOS.
applications targeting macOS. In general, this class should only be used
if requiring C runtime functions (@c strtod) to be localized.
In wxWidgets this class manages current locale. It also initializes and
activates wxTranslations object that manages message catalogs.
+8 -1
View File
@@ -48,6 +48,13 @@ enum
current UI locale or wxString::FromCDouble() and wxString::ToCDouble()
functions for doing it always using period as decimal separator.
To set the C runtime functions (e.g., @c strtod()) to use the user's locale
consistently on all platforms, a wxLocale object should be created and
initialized with @c wxLANGUAGE_DEFAULT. This is not recommended due to
various side effects, but can be done for applications which rely on these
functions. (Note that this should be done in conjunction with calling
wxUILocale::UseDefault().)
Localized applications should call wxUILocale::UseDefault() on startup to
explicitly indicate that they opt-in using the current UI locale, even if
this results in changing the global C locale, as is the case in wxGTK. Note
@@ -61,7 +68,7 @@ enum
listed as a supported language in the application @c Info.plist file under
@c CFBundleLocalizations key.
Unlike wxLocale class, this class doesn't affect the translations used by
Unlike the wxLocale class, this class doesn't affect the translations used by
the application, see wxTranslations for doing this.
@library{wxbase}