Repository navigation
Description
🏷️ Feature Type
✨ New Feature
📦 OpenSourcePOS Version
development (unreleased)
🎯 Problem Statement
The Language dropdown at Config > Localization shows every language name in English (e.g. "German (Switzerland)", "Chinese (Simplified)") regardless of which language it represents. Native speakers expect to see their language listed in its own script/self-name (endonym), e.g. "Deutsch (Schweiz)", "简体中文", so they can find and recognize their language even if they can't read English.
The list is hardcoded in get_languages():
https://github.com/opensourcepos/opensourcepos/blob/main/app/Helpers/locale_helper.php#L52-L103
A related but separate problem exists in get_timezones() just below it:
https://github.com/opensourcepos/opensourcepos/blob/main/app/Helpers/locale_helper.php#L108-L205
Here the region/city descriptions ("Chihuahua, La Paz, Mazatlan", "Beijing, Chongqing, Hong Kong, Urumqi", etc.) are hardcoded English strings baked directly into the array values, with no i18n at all — the timezone dropdown never localizes no matter what UI language is selected.
💡 Proposed Solution
Language list (get_languages()):
- Keep the array hardcoded (it's a fixed list of locale keys, not user data), but change each value to the language's own endonym instead of the English name.
- Example:
'de-CH:german' => 'German (Switzerland)'becomes'de-CH:german' => 'Deutsch (Schweiz)'. - Since these are proper-noun self-names they don't need to route through
lang()— they're the same regardless of the active UI language — but the list should be reviewed against native-speaker sources for accuracy.
Timezone list (get_timezones()):
- Extract the free-text region/city portion of every entry into
Config.phplanguage keys (one peren/Config.php, then translated per locale), and localize the strings vialang()when the array is built. - The
Etc/GMToffset prefixes (e.g.(GMT-08:00)) can stay as-is since they're not language-dependent. - This needs new keys added to
app/Language/en/Config.php(source language) and equivalent translated keys added to every otherapp/Language/<locale>/Config.phpfile.
🔄 Alternatives Considered
- Using PHP's
intlextension (ResourceBundle/Locale::getDisplayLanguage()) to generate endonyms and CLDR timezone names dynamically instead of hardcoding. Would reduce maintenance but adds anintlextension dependency and less control over exact formatting/parenthetical region labels currently used; keeping the hardcoded approach per current codebase convention.
✅ Acceptance Criteria
Given the Config > Localization > Language dropdown
When it is rendered in any UI language
Then each language option displays in its own native language/script rather than in English
Given the Config > Localization > Timezone dropdown
When the active UI language is not English
Then the city/region descriptions are shown translated in that language, sourced from Config.php language files
✓ Confirmation
- I have searched existing feature requests to ensure this is not a duplicate
- I have provided a clear problem statement and proposed solution
Activity
objecttothis commentedon Oct 22, 2026
Claude Issue Checker Agent (cc @objecttothis)
I investigated this against current
master.Status: Still present (feature not implemented).
Evidence (
app/Helpers/locale_helper.php):get_languages()still returns every language name as an English display name, e.g.'de-CH:german' => 'German (Switzerland)','zh-Hans:simplified-chinese' => 'Chinese (Simplified)'. No endonyms/self-names have been introduced.get_timezones()still hardcodes English region/city descriptions directly in the array values (e.g.'America/Chihuahua' => '(GMT-07:00) Chihuahua, La Paz, Mazatlan','Asia/Hong_Kong' => '(GMT+08:00) Beijing, Chongqing, Hong Kong, Urumqi') with nolang()call orConfig.phpkey lookup — so these strings are never localized regardless of UI language, matching the problem statement exactly.I found no related merged commits or PRs touching
locale_helper.php'sget_languages()/get_timezones()for this purpose. This feature request appears to still be open work.