[wp-trac] [WordPress Trac] #50752: Internationalization of a slug using user language instead of site language
WordPress Trac
noreply at wordpress.org
Fri Jul 24 07:56:58 UTC 2020
#50752: Internationalization of a slug using user language instead of site language
--------------------------+-----------------------------
Reporter: dennismenken | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: I18N | Version: 5.4.2
Severity: normal | Keywords:
Focuses: |
--------------------------+-----------------------------
I have tried to make a custom post type slug translatable.
For this I have used the following snippet:
{{{
'slug' => _x('recipes', 'URL slug', THEME_TEXT_DOMAIN)
}}}
Then I have added the string translation for recipes in german called
"rezepte". The dynamic links in the frontend got an update. But the
regeneration of permalinks doesn't work for my user because my language is
set to English (UK) and the site language is set to German Formal. I have
switched my profile language to German Formal and have updated the
permalink structure again. Then it works.
It must be bug because if a user using an another language than the site
language and refreshing the permalink structure it falls back to the user
language or non-language if a translation is missing.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/50752>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list