Hot answers tagged

4

You can use the tool POEdit to translate your theme from scratch or update/add new strings into the .po/.mo files. Here is the tool usage tutorial: Translating_With_Poedit There is a plugin that can do the job for you: codestyling-localization STEPS: 1. Load a text domain for the theme. add_action('after_setup_theme', 'my_theme_setup'); function ...


3

The define('WPLANG', 'ru_RU'); in the wp-config.php is no longer needed, as WordPress stores this value in the database (starting from version 4.0). However, I suppose your problem is actually something different. Your Steps: Add a filter to locale To ensure your language is set correctly, use a code like this: add_filter( 'locale', 'f711_set_language' )...


3

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 stated,...


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 ...


3

Child themes should use load_child_theme_textdomain(). You can find it in /wp-includes/l10n.php. Use a new slug and a separate po file.


2

Have you added the Function load_theme_textdomain to the theme? so if you have them themes .mo files in theme/mytheme/languages Loads the theme's translated strings: add_action('after_setup_theme', 'my_theme_setup'); function my_theme_setup(){ load_theme_textdomain('my_theme', get_template_directory() . '/languages'); } Put this in your functions.php


2

You have incomplete code. You register your Theme's textdomain, but don't actually tell WordPress to load your translation files. To this: load_theme_textdomain('INTERluminaires', get_template_directory() . '/languages'); Add this: $locale = get_locale(); $locale_file = get_template_directory() . "/languages/$locale.php"; if ( is_readable( $locale_file )...


2

First of all, the plugin should support translation. If it is so, the directory where to put po/mo file is defined by plugin, usually they are in a directory /langs or /languages in plugin directory. That directory is (should be) defined by plugin using load_plugin_textdomain The plugin you are using has a subfolder cimy-user-extra-fields/langs where you ...


1

I'm not completely sure whether this is what you want, but if the option page is in one language you can simply put the gettext call in the custom field itself to avoid using variables. For the admin you force the translation to spanish: function wpse227983_force_language ( $locale ) { if ( is_admin() ) { return 'es_ES'; } return $locale;...


1

One way is to use the WordPress i18n tools. I had to checkout WordPress trunk to make it work. On the command line: svn co http://develop.svn.wordpress.org/trunk once you have trunk somewhere, you'll then want to call the makepot script. Again, on the command line: php /path/to/wordpress/trunk/tools/i18n/makepot.php wp-theme /path/to/your/theme/ After ...


1

use poedit, and build a translation database with it. Even without poedit you can probably parse an old po file to read all the translation and replace the matching string in the new file.


1

No matter what languages your site are in, when using WPML you should never install a localised WordPress version, instead you should just install the default one (i.e. US English). Also make sure that you didn't change the LANG definition in your wp-config.php file, so that should read: define ('WPLANG', ''); Then you need to make sure that all the ...


1

You need create a es_ES.mo file, using the .po file included with the Theme. Try using something like POEdit or a similar utility.


1

I was able to fix the problem by switching the xdebug extension. I had a vc9-nts version installed and switched to vc6-nts which solved the issue.



Only top voted, non community-wiki answers of a minimum length are eligible