Skip to content

fix: setLocaleFromURL (case-insensitive and handling fallback locales) 🌋#733

Open
darcywong00 wants to merge 1 commit into
epic/i18n-url-schemefrom
fix/fallback
Open

fix: setLocaleFromURL (case-insensitive and handling fallback locales) 🌋#733
darcywong00 wants to merge 1 commit into
epic/i18n-url-schemefrom
fix/fallback

Conversation

@darcywong00
Copy link
Copy Markdown
Contributor

@darcywong00 darcywong00 commented May 11, 2026

Found while integrating Keyman for Android which reports Spanish locale as es-ES

Had to make the following changes to setLocaleFromURL():

  • make regex case-insensitive
  • check with fallback locales

This way, the following link shows in Spanish (which uses es.php files)
http://keyman.com.localhost/es-ES/keyboards/?embed=android&embed_version=19.0

invalid locale like
http://keyman.com.localhost/rv-tS/keyboards/?embed=android&embed_version=19.0

appears in English

Test-bot: skip

* make regex case-insensitive
* assign fallback locale
@darcywong00 darcywong00 added this to the A19S29 milestone May 11, 2026
@darcywong00 darcywong00 requested a review from mcdurdin May 11, 2026 23:25
@keymanapp-test-bot
Copy link
Copy Markdown

User Test Results

Test specification and instructions

User tests are not required

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

2 participants