How to translate Gutenberg Block name and description?
How to translate Gutenberg Block name and description?
How to translate Gutenberg Block name and description?
WordPress Dataviews React multilanguage i18n
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
The issue was that for themes the .mo and .po files needs to be called {locale}.mo or .po not {textDomain}-{locale}.mo/po
When your .mo files are however put to use in your application under the hood, wordpress parses your translation files into an associative array and extracts the translations as such, instead of relying on the native PHP gettext functions. Because it isn’t installed often and not always available, so a PHP based mo reader is … Read more
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
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
How do I output translated text strings on edit screens
Localization PHP: How can I scan the theme to detect the addition of a new string to be internationalized?
Does wp i18n CLI has a prototype of “update-json” file?