generating po mo translating files from scratch in a wordpress theme

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 my_theme_setup(){ load_theme_textdomain(‘mytheme’, get_template_directory() . … Read more

How-to: Translate plural forms for themes/plugins with PoEdit

Step 1 Open your file in PoEdit. Step 2 Go to “Catalogue” » “Settings“ Step 3 Fill in “Language” and “Country” 1). Step 4 Fill “Pluralform” (last field). // For 2 plural forms nplurals=2; plural=n != 1; // For 3 plural forms (for e.g. russian), use: nplurals=3; plural=(n%10==1 && n%100!=11) ? 0 : ((n%10>=2 && … Read more

Custom strings for translation using Polylang plugin

Use this pll_register_string() on functions.php Use it like this: pll_register_string Allows plugins to add their own strings in the “strings translation” panel. The function must be called on admin side (the functions.php file is OK for themes). Usage: pll_register_string($name, $string, $multiline); ‘$name’ => (required) name provided for sorting convenience (ex: ‘myplugin’) ‘$string’ => (required) the … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)