Tag Info

New answers tagged

2

There is even a better solution: a filter called plugin_locale. It filters the locale argument before using it in load_plugin_textdomain. add_filter( 'plugin_locale', 'mytheme_plugin_locale' ); function mytheme_plugin_locale() { return 'en_US'; }


1

I'd use printf to put the markup into place after the translation. You can force the order with the right modifiers, but translators are probably smart enough to not really need that. printf( __('The image %sMUST%s be less than %s500 KB%s in size.', CUSTOM_TEXT_DOMAIN), '<em>', '</em>', '<strong>', '</strong>' ) ; I consider ...


2

There are already an en_US.po file in the theme you are using. You can simply make a copy of that file and rename it as pl_PL.po. You can now open the pl_PL.po template with poedit, do all your translations in there, and just save it. Poedit will automatically create a pl_PL.mo template. No need to go through all the pt. Just remember, as previously ...


3

Hi to translate your website you can do the following: Define your language in wp-config.php : define('WPLANG', 'pl_PL'); Then generate a po file for your theme with e.g this service: iCanLocalize Scanner Then your po and mo files should be named pl_PL.po and pl_PL.mo and put into a folder called languages or lang or something like this in your theme. if ...


1

Because you are hardcoding the link, you will need to use icl_link_to_element() function and wrap any text you want to translate inside a gettext function: <?php icl_link_to_element( 'ID_of_your_news_page', 'page', '<h4>' . __('News') . '</h4>' ); ?> This way you will get the correct version of the link based on the current language with ...



Top 50 recent answers are included