-
-
Notifications
You must be signed in to change notification settings - Fork 34.5k
Support locale module on Android #135753
Copy link
Copy link
Open
Labels
OS-androidstdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytype-featureA feature request or enhancementA feature request or enhancement
Metadata
Metadata
Assignees
Labels
OS-androidstdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytype-featureA feature request or enhancementA feature request or enhancement
Projects
Status
Todo
Migrated from chaquo/chaquopy#1150:
From beeware/toga#2562:
I don't think Android sets any of the standard
LC_...environment variables, probably because it supports changing the locale within the lifetime of a single process. Instead, it provides an Android-specific API:This will return a string in the form
en_US, which can be passed tolocale.setlocale.The difficult part is getting a reference to the
contextobject. For details, see #90371 (comment).