Articles of po

Install translation files that should survive updates

This question already has an answer here: Best location for theme translation files 1 answer

Localization: Textdomain of Child teme

I am creating a series of WP child themes which are dependent of a parent theme which I will be using as a framework. I need to have these themes (both parent and children) localized. from http://codex.wordpress.org/Function_Reference/load_theme_textdomain I understood I need to add the following to my theme: add_action(‘after_setup_theme’, ‘my_theme_setup’); function my_theme_setup(){ load_theme_textdomain(‘mytextdomain’, get_template_directory() . […]

WordPress po files

Hi all I have one problem. Po file doesn’t work. I use qtransltae-x for translation. And I create custom pot file example # Copyright (C) 2015 Gawatt msgid “” msgstr “” “Project-Id-Version: Gawatt 1.0.0\n” “POT-Creation-Date: 2015-06-03 11:30+0400\n” “MIME-Version: 1.0\n” “Content-Type: text/plain; charset=UTF-8\n” “Content-Transfer-Encoding: 8bit\n” “PO-Revision-Date: 2015-MO-DA HO:MI+ZONE\n” “Last-Translator: FULL NAME <EMAIL@ADDRESS>\n” “Language-Team: LANGUAGE <LL@li.org>\n” “X-Generator: […]

Translation-readiness of Koi theme

I am migrating a (non-English-language) blog using the Koi theme on WordPress.com to a self-hosted environment, but see that certain strings are no longer being translated. For example, if my wp-config.php file contains define (‘WPLANG’, ‘de_DE’), then _most of the theme is indeed translated to German, but “Leave a Comment” remains in English. After downloading […]

Getting translated string through a variable

I am translating a website into different languages, and I have the following problem: Through the backend, user can select via a dropdown, a value (text string) from a list of 50 options. This dropdown is stored in a custom field (by the way, managed with ACF PRO). When a user visits the translated version […]

How to extract translatable (double underscores and _e) strings?

I made a custom theme and wonder how could I extract all translatable strings to a .po file so I can translate it. Do I need WPML plugin? Ex: I have a string “soccer” which is written as _e(‘soccer’,’mytheme’); and I want to translate it to “futebol” but how can I transport it to a […]

How to tell a theme to use different .mo and .po files?

I have a theme which loads .po and .mo files to display strings in English. I want to have only one language (Polish), but those two files are en_US. I tried replacing content in the en_US.po file but nothing changed on the website, I do not know why. Where does it store strings if changing […]

generating po mo translating files from scratch in a wordpress theme

Maybe I’m missing something here but I really can’t find any answer to my question around the web. I am creating a new wordpress theme from scratch (literally from scratch) and would like to create languages folder with PO and MO file in it. I would like to generate this translation MO file from scratch […]