Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

switch-language is not activating the language after a fresh WordPress install #156

Closed
robsonpessoa opened this issue Aug 1, 2024 · 3 comments

Comments

@robsonpessoa
Copy link

robsonpessoa commented Aug 1, 2024

I noticed that wp site switch-language is not working after a fresh installation of WordPress 6.6.1. Even though the command prints that activated the language successfully, the en_US keeps activated as the output of the wp language core list.

I've tried the following:

$ wp language core list --status=active --format=csv --fields=language
language
en_US

$ wp language core list --status=installed --format=csv --fields=language
language
pt_BR
uk

$ wp site switch-language uk
Success: Language activated.

$ wp language core list --status=active --format=csv --fields=language
language
en_US

If I run the command with the pt_BR, the behaviour is the same, so it may not be related with the chosen language, I guess.

I also noticed that, after I change manually the language in the Settings at wp-admin to any other installed language (not the en_US) one first time, the admin pages then change its language correctly if I run the command wp site switch-language again. But the command wp language core list keeps printing en_US as the active language.

EDIT
The theme I'm using does not implement internationalization, so if I run the command wp language theme list only the en_US is listed. I'm not sure if it's related to the problem, but as I would like to change the WordPress core language, I think it shouldn't be.

@ernilambar
Copy link
Member

May be related to #84

@swissspidy
Copy link
Member

May be related to #84

I doubt it, because that one is specifically for en_US.


Sounds strange that the command isn't working for you. All it does is update_option( 'WPLANG', 'uk' );. So if that fails, there's probably some issue specific to your site.

@swissspidy
Copy link
Member

BTW, just realized the site switch-language command isn't documented in this repo, nor do we have a label for it or anything.

@swissspidy swissspidy closed this as not planned Won't fix, can't repro, duplicate, stale Aug 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants