How to retrieve blog language without any region (locale) attached?

I’m posting this at the request of one of our Discord users, who doesn’t use WPSE: Stack Overflow / Stack Exchange is kind of a bizarre place. Why is that question voted “-2”? The question is basically asking more or less the same thing that multiple WordPress tickets are asking for: https://core.trac.wordpress.org/ticket/48152 https://core.trac.wordpress.org/ticket/50183 Also the … Read more

Javascript localization doesn’t load. How to Internationalize javascript without plugin?

Good News after 2 days! I resolved my issue, but I believe that wp i18n make-json does not generate the json file correctly. Why? Because it uses the ISO codes and not the locale (get_locale()) from the browser/user. So it isn’t “en_GB” that should be used but “en” in the .json file. This : “locale_data”: … Read more

How to change the lang=”en-US” value of the HTML document?

The value for that string is normally taken from the option WPLANG in your database table $prefix_options. You can set it in the backend under Settings/General (wp-admin/options-general.php) or per SQL. There several ways to change that value per PHP: Create a global variable $locale in your wp-config.php: $locale=”en_GB”; Declare the constant WPLANG in your wp-config.php: … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)