January 18, 2014 at 4:20 pm #211571
I used a child theme.
In my own header.php i have had a line lik this :
I go to WPML strings translations to add my french text but i fond nothing…
So i try to find a string which is present ig the header.php :
echo “<nav class=’main_menu’ data-selectname='”.__(‘Select a page’,’avia_framework’).”‘ “.avia_markup_helper(array(‘context’ => ‘nav’, ‘echo’ => false)).”>”;
I open (within WPML strings translations) the file where this php string ha been found and… yes it found it but not in my child header.php file but it the parent theme:
Too bad… :-(January 18, 2014 at 5:57 pm #211585
Use Codestyling ( http://wordpress.org/plugins/codestyling-localization/ ) and translate the po/mo file. Install the plugin, go to Tools > Localization and select “Themes”. Then search for “Enfold” in the list and click on “Add new language”. Then select your language from the list and click the “create po-file” button. Click on “Rescan” to search for all text strings. Then click on “Edit” and translate the required strings from the “avia_framework” textdomain. At least click the “create mo file” button next to the “Textdomain” selection dropdown (top left corner).
If you want to add some custom text to the translation file wrap it into a __() function like
If you want to register a new text string with WPML see: http://wpml.org/faq/getting-string-translation-to-work/
PeterJanuary 18, 2014 at 6:20 pm #211601
With my others 14 wordpress websites i used to use codestyling localization and it works perfect.
For the one i was talking i ca not use it so i try to use the String Translations tool.
And i did :-) but it is not easy as with codestyling localization but it works..
> i use this and it works:
<a title="<?php echo _e('Tweet this','avia_framework'); ?>" class="addthis_button_twitter"></a>
WHAT is the difference with yours?
thanksJanuary 18, 2014 at 6:21 pm #211602
I can’r read your code – please use the “code” button to post it…
PeterJanuary 18, 2014 at 6:22 pm #211603January 18, 2014 at 6:31 pm #211612
There’s no difference. In this case the WPML to translate the strings. If the right textdomain (“avia_framework”) is used the string should be translated…
PeterJanuary 18, 2014 at 6:34 pm #211616January 18, 2014 at 6:42 pm #211621
The topic ‘Enfold is not compatible qit Issue with WPML and child theme’ is closed to new replies.