Tim
  • Member for 7 years, 11 months
  • Last seen more than a month ago
How to change WordPress core language using Loco Translate?
0 votes

There are only four files in the default text domain. I found "Add Media" in the first one. (Development). I don't recommend generating your own template. This is an advanced tool for authors. Use ...

View answer
Securing langugae folder
0 votes

The short answer is to use the location wp-content/languages/woocommerce/ to store custom translations. See WooCommerce documentation. This location should be safe from all WordPress updates. ...

View answer
How connect my plugin translation to my page
0 votes

And what to do next? I guess it should be linked somewhere. The plugin loads your language itself, so you don't need to do anything. However, it must be named correctly. I added my translated .po ...

View answer
Translate are not working for standard admin
Accepted answer
0 votes

The only instance of "Count" I can see in the default domain's admin file has a context value of "Number/count of items". So your code should be: add_action( 'admin_init', 'action_admin_init' ); ...

View answer
Load custom translation in custom plugin fails
Accepted answer
0 votes

I think Jacob has probably solved your problem in the comments. However, to your question: How to debug further this issue? I would hook into the load_textdomain_mofile filter and check the fully ...

View answer
rest api endpoint - accept diacritic characters
Accepted answer
2 votes

Looks to me like WordPress doesn't enable UTF-8 mode when it runs the regex. https://github.com/WordPress/WordPress/blob/5.2.1/wp-includes/rest-api/class-wp-rest-server.php#L837 In PHP, matching ...

View answer
Child Theme Translations with PoEdit
0 votes

Does the child theme's text domain have to be the same as the parent theme's text domain? It must NOT be the same. Text domains must be unique. If the parent theme loads a file into "...

View answer
Uncaught SyntaxError: missing ) after argument list
0 votes

You have the same error repeated on each script. Look at the attribute delimiters. They start using double quotes, then switch: <script src="https://...js' defer onload='"> ...

View answer
Localize plugin name
Accepted answer
3 votes

Just add the full string of the plugin name into the plugin's text domain. WordPress looks this up automatically. Same with Description, PluginURI, Author and AuthorURI. See the internal function ...

View answer
Wordpress in French Language
Accepted answer
0 votes

You have a UTF-8 encoding issue. You are seeing single, unprintable bytes. That suggests the data is either stored in a single byte character set, or something is converting it from UTF-8 to a ...

View answer
How to disable gettext feature?
0 votes

You already have the answer, but perhaps you're not running your code early enough. Returning true from the override_load_textdomain filter will prevent all MO files from loading, but you'll have to ...

View answer
Transliterating search term in another language
1 votes

If you have PHP's Intl extension installed, you can use the wonderful Transliterator class. I get some pretty good results, like this: $t = Transliterator::create('Latin-Greek', Transliterator::...

View answer
How to translate timestamp?
0 votes

The "%s" will be replaced by strings translated in the WordPress Core "default" text domain. e.g. "%s mins", "%s hours", etc.. Find these in your core translation files and translate them too.

View answer
I dont know why my localization is not working
Accepted answer
0 votes

Your error is here The path to your bundled translations resolve to a languages folder inside the includes folder, which is one level down from where it actually is. Try it with an extra dirname and ...

View answer
Is it best practice to use English as the base of a translation-ready theme?
Accepted answer
1 votes

The default language of WordPress is always English (en-US). Regardless of what your site language is set to. This is what the entire WordPress community expects for the language of source strings, ...

View answer
Unknown language json files
Accepted answer
6 votes

what are these language files for? (I guess it is for localizing javascript?) You guessed right. The JSONs are for use specifically with the new wp_set_script_translations function in WordPress 5. ...

View answer
Translations in source code
1 votes

This is "normal" in WordPress 5 as this is what the new wp_set_script_translations function is for. The function tells WordPress to associate a JSON file containing translations with a specific ...

View answer
load_plugin_textdomain in `plugins_loaded` or `init`?
Accepted answer
4 votes

Load translation files as late as possible for your plugin's use-case. This allows other plugins as much time as possible to fully initialise. Why should you care about other plugins? Because they ...

View answer
Cross origin ajax request always returns 0 when calling get_current_user_id();
Accepted answer
-1 votes

Don't write your own bootstrapper, use Ajax hooks via wp-admin/admin-ajax.php Documentation: https://codex.wordpress.org/AJAX_in_Plugins Then you can be sure WordPress has included all the functions ...

View answer
Found a translation function that is missing a text-domain. Function _n
Accepted answer
2 votes

Your error (actually a warning) seems to come from the Theme Check plugin. There's nothing wrong with the code you're showing above. 'acf' is your text domain. and the _n function takes four ...

View answer
Different translations for the same plugin inside a multisite
Accepted answer
1 votes

You can use WordPress hooks to load site-specific files, but it requires some work. In this example, we'll keep a common Dutch language file at a system location. This can contain any strings that ...

View answer
How to set different localization file for different users?
0 votes

By default WordPress only loads translations according to the user's language when they're viewing admin pages. You can see that in the code for the load_theme_textdomain function: $locale = ...

View answer
get_the_date() for translating date format
0 votes

Old question, but no answer accepted, so here goes.. You get weird output, because _e just prints "F j" literally and isn't passing it to the function. Hence you get the raw format followed by the ...

View answer
Localisation and Wordpress
0 votes

WordPress has no ability to switch language based on URL or query string parameter. In fact it does no dynamic language switching at all. Wherever you've seen this working, it would have been using a ...

View answer
Can't translate the post meta data (Date) in another language
Accepted answer
1 votes

You don't need to change any code. get_the_date without an argument will use the date_format option in your WordPress settings. The option F j, Y will substitute F as "September", but if you have a ...

View answer
Do i have make the content() also translation ready in theme?
Accepted answer
2 votes

Do i have make the content() also translation ready in theme? Short answer - No. 1). Content held in the database is generally not translated via static files. That includes post content and other ...

View answer
Problems with localization
1 votes

1) Presuming you're running WordPress 4.x. The WPLANG constant does nothing. WordPress 3 and below defined the default language in wp-config.php but since WordPress 4 setting your site language is ...

View answer
How to override default Wordpress core language file
Accepted answer
1 votes

Correcting the answer given by Max. To use this approach, the filter you need is gettext_with_context because your string is translated via _x() not __(). Note that the filtered argument passed is ...

View answer
why is translation not working on theme?
0 votes

I downloaded the free Rookie parent theme and have no problem displaying translations of "Search Results for: %s" on a successful search results screen. This works in the WordPress languages folder ...

View answer
What is the way to ship read-me strings like plugin-strings for internationalization?
0 votes

You can ship translations of some of the metadata used in your main plugin file's header comment fields. Namely: Name, Description, PluginURI, Author, and AuthorURI. Just add the source strings into ...

View answer