Tag Info

New answers tagged

0

OMFG that is the most stupid code I saw in core for some time. Don't follow the comments there, if you want to use a different flavor of open sans just write a plugin that deregister the style and add the one you want to be used instead function replace_open_sans() { wp_deregister_style('open-sans'); wp_register_style('open-sans', ...


3

This is a very faceted issue. It combines inherent HTML content issues with whole new load of translation challenges, such as scanning for strings, translation process itself, and its verification. So we have to combine: Text (in translatable form) HTML markup (in hard to break, but preferably flexible form) URL destination (in secure and preferably ...


1

You have to keep the markup in the translatable string, because the translators have to know there is a link. In some languages the resulting link text might span multiple words, there could even be a comma (or an equivalent) inside or other markup that needs to be nested correctly. It is also important to build a speaking link text, not this or here. 2 ...


0

In the meanwhile, I found another solution that works as well for older versions of WordPress. Here is how it goes: Install the plugin Backend Localization (Optional) upload additional localization files. Go to Plugins > Backend Localization > Settings and select your language of choice. Save that change. Now you get the correct output <html ...


1

Locale comes from WPLANG constant defined in wp-config.php. In the last version of Wordpress (4.0, maybe 3.9) something is changing. You can install more languages setting WPLANG to different locale. Then you can select the language in the backend from Settings > General > Site language and set locale in the header. It seems that starting from Wordpress v4.1 ...


0

In short: it's the so called »textdomain«. The longer explanation: If you look accurate on your first example, you'll see, that this parameter is not the second parameter for the_content but for the Funktion __(): <?php the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'twentythirteen' ...


1

To translate something in your js you can use wp_localize_script() really handy : $translation_array = array( 'some_string' => __( 'Some string to translate' ), 'a_value' => '10' ); wp_localize_script( 'some_handle', 'object_name', $translation_array );



Top 50 recent answers are included