Translating header part with code placement plugin
-
Hi,
great Plugin!!
I’ve following question: I try to create an if/else php statement through the plugin “easy code placement”. I put some content in the header through this “code placement plugin” and it’s not translated automatically when I click on the language switch button.
That’s why I want to write an if/else code in order to translate this header part.
I tried following solutions to add into the code placement plugin:<?php global $sublanguage; $name = echo $sublanguage->current_language->post_name; if($name == 'en'){ print "english text"; } print "german text"; } ?>
OR
<?php $Id = echo get_permalink($post->ID); if ($Id == 'eng') { return 'english text'; } return 'german text'; } ?>
OR
<?php function my_custom_translation($original_text, $current_language, $optional_arg) { if ($current_language->post_name == 'eng') { return 'english test'; } return $original_text; } ?>
Unfortunately nothing works – what do I wrong? I tried to follow the FAQ supports…
I would be very very greatful if someone could help me.
Thank you!!
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Translating header part with code placement plugin’ is closed to new replies.