Tag Info

New answers tagged

2

In lack of translation file the default strings from source code are being used. So if plugin is coded in US english then it just has that version in source and doesn't need the translation for it. The native way to generate translation files in WP is makepot script, shipped with development version of WordPress core. See Using the i18n tools documentation ...


0

Filtering gettext is horrible for performance. I would strongly recommend to try do it via any other approach. And if all else fails to add and remove filter with extreme precision around necessary parts. As for why it fails my educated guess would be — timing. It is quite common for strings to be centralized and processed early in the process. For example ...


0

Your theme's text domain is defined in your Theme Header in style.css. For example: /* * Plugin Name: My Plugin * Author: Otto * Text Domain: my-plugin */ The text domain should match your theme's 'slug' (ie. the name of the folder where your theme is stored). Read more: https://codex.wordpress.org/I18n_for_WordPress_Developers#Text_Domains


2

Before we go into details, it should be noted that the guides you are referring to is only what it is, a guide. Just like coding standards (which not even the core developers stick to :-)), the Wordpress Handbook is just a guide to developers, it is not the alpha and omega. The basic idea is to use this guide and implement these guideline in such a manner ...


3

If you don't provide any textdomain, WordPress translated strings are used. If you use, for example, __( 'Add New Tag' );, the translation from WordPress core will be used because 'Add New Tag' exists in WordPress. Your problem is that your are defining labels that don't exist in WordPress core, so they are not included in any WordPress translation files. I ...



Top 50 recent answers are included