Skip to content

Integrate/pr 42 language mapping - #44

Open
dgwatkins wants to merge 5 commits into
masterfrom
integrate/pr-42-language-mapping
Open

Integrate/pr 42 language mapping#44
dgwatkins wants to merge 5 commits into
masterfrom
integrate/pr-42-language-mapping

Conversation

@dgwatkins

Copy link
Copy Markdown
Contributor

No description provided.

SNO7E-G and others added 5 commits August 24, 2026 14:25
lang_slug_to_wpml_format() knew about exactly two languages, pt and zh.
Everything else was passed to WPML as the raw Polylang slug, and WPML
stores whatever it is given, so any site whose slug differed from the
WPML code was migrated into a code WPML cannot resolve, silently.

The dependable bridge is the locale: Polylang keeps it in the language
term description, WPML keeps it in icl_languages.default_locale with
per-site overrides in icl_locale_map. This resolves through WPML's own
tables in reverse. Fixes Traditional Chinese (was migrated as
Simplified), Norwegian, and any custom slug. Languages WPML still cannot
match are recorded via get_unmapped_languages() instead of written blind.
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.

2 participants