


ICL_LANGUAGE_CODE == 'en'
qtrans_getLanguage()==’en’
/**
* Setup Responsive Child Theme's textdomain.
*
* Declare textdomain for this child theme.
* Translations can be filed in the /languages/ directory.
*/
function my_child_theme_setup() {
load_child_theme_textdomain( 'responsive-child', get_stylesheet_directory() . '/languages' );
}
add_action( 'after_setup_theme', 'responsive_child_setup' );
<?php _e( 'Code is Poetry', 'responsive-child' ); ?>
grappler wrote:Hello,
I started translating the Responsive Theme in German. Below is the link. If anyone can help with German or any other language then click on the link and have a look.
https://webtranslateit.com/en/projects/3598-Responsive-Theme
Thank you
I had a bit of a problem translating this and in the end I translated it as Your H2 subheadline comes hereDon't panic, we'll get through this together. Let's explore our options here.
Your H2 subheadline here
Emil wrote:Thanks, please let me know when you are done and I will add this into language folder and credit you for it.
Emil
grappler wrote:Thank you for your support. I have a couple of questiosn for the text.
The text came twice and I was wondering if it would be possible to include as only one.I had a bit of a problem translating this and in the end I translated it as Your H2 subheadline comes hereDon't panic, we'll get through this together. Let's explore our options here.Your H2 subheadline hereEmil wrote:Thanks, please let me know when you are done and I will add this into language folder and credit you for it.
Emil
Emil wrote:It's there because there's two different places, one is in 404.php and the other one in all other template/files. The localization generated like that, but that should not be an issue for you, whatever you translate in one, just paste that for the second one and you should be just fine.
The second part doesn't need to be translated literally.
Emil

grappler wrote:Ok thats fine. I am finished now. Here are the files.
I just found a spelling mistake. You forgot the e in manageable.
Emil wrote:It's there because there's two different places, one is in 404.php and the other one in all other template/files. The localization generated like that, but that should not be an issue for you, whatever you translate in one, just paste that for the second one and you should be just fine.
The second part doesn't need to be translated literally.
Emil
Emil wrote:Thanks, I will release this in next version
Emil
grappler wrote:I found a small error and corrected it. If you placed this link https://webtranslateit.com/en/projects/3598-Responsive-Theme somewhere more visible then perhaps someone else will help with other languages.
Emil wrote:Thanks, I will release this in next version
Emil

grappler wrote:Hey Emil,
Someone has joined the translation team and has started translating the theme in Portuguese.
I also saw you got a question regarding WPML. As your theme is getting so popular would you consider entering the WPML certification program?
http://wpml.org/documentation/theme-compatibility/go-global-program/
grappler wrote:I have seen you have updated your Theme to include a couple of new options. Please could send me an updated version of responsive.pot. Would it be possible to send me the updated pot file before you update your theme so I can check if everything has been translated.
Ulrich
Emil wrote:Hi,
I have updated you're correct and the updated version is available in the Theme directly. And also the .pot is in http://themes.svn.wordpress.org/responsive/1.5.0/languages/ I need one more update for new Theme Option additions and I believe "Powered by" in footer.php. Time is not on my side, as soon as I grab more I will get the rest as well.
Thanks,
Emil
<?php esc_attr_e('powered by', 'responsive'); ?>
grappler wrote:I updated the pot file myself but the "Powered by" in footer.php was not inlcuded. I am not sure what the problem is.
Thanks,
Ulrich
Emil wrote:Hi,
I have updated you're correct and the updated version is available in the Theme directly. And also the .pot is in http://themes.svn.wordpress.org/responsive/1.5.0/languages/ I need one more update for new Theme Option additions and I believe "Powered by" in footer.php. Time is not on my side, as soon as I grab more I will get the rest as well.
Thanks,
Emil
belloli wrote:Hi,
I have been translating the theme since the day 17/04/2012.
My pt_BR version 1.5.0: http://dl.dropbox.com/u/38050565/Translations/wp-theme-responsive-1_5_0.zip
Some issues:
Footer: Responsive Theme powered by WordPress
Well, "powered by" already reported.
Link to WordPress. There is translation, but does not work. In case of Brazil, http://br.wordpress.org/
1 COMMENT » FOR title of post
% COMMENT » FOR title of post
"FOR" is not translated.
Breadcrumb: "Home" is not translated.
./wp-admin/themes.php?page=theme_options
Home Page -> "See Docs"
Webmaster Tools -> "Leave blank if plugin handles your webmaster tools"
Social Icons: "Instagram" | "Enter your Instagram URL" | "Pinterest" | "Enter your Pinterest URL"
Custom CSS Styles: All content.
And: ./wp-admin/themes.php?page=custom-header
"Warning: call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, 'responsive_admin_header_style' was given in ./public_html/wp-includes/plugin.php on line 405"
Oh, and thanks, your theme is amazing.
grappler wrote:Hello,
There was a new version released and there were a few more features added. I am trying to update the POT file so to be able to translate them as Emil is quite busy at the moment.
Could could you proof read the translations that you have done and I will let you know when I upload the new POT file.
Ulrich

belloli wrote:The translation was made. But, I'm waiting for proof of Fernando Correia.
grappler wrote:Hello,
There was a new version released and there were a few more features added. I am trying to update the POT file so to be able to translate them as Emil is quite busy at the moment.
Could could you proof read the translations that you have done and I will let you know when I upload the new POT file.
Ulrich
grappler wrote:Hey Emil,
What did you use to create the pot file?
Thanks
<h6 id="comments"><?php comments_number(__('No Comments »', 'responsive'), __('1 Comment »', 'responsive'), __('% Comments »', 'responsive')); ?> for <?php the_title(); ?></h6>
Can we have the for included in the stings.<h6 id="comments"><?php comments_number(__('No Comments » for', 'responsive'), __('1 Comment » for', 'responsive'), __('% Comments » for', 'responsive')); ?> <?php the_title(); ?></h6>
includes/theme-options.php
<a class="help-links" href="<?php echo esc_url(__('http://themeid.com/forum/topic/510/theme-options-featured-content/','responsive')); ?>" title="<?php esc_attr_e('See Docs', 'responsive'); ?>" target="_blank"><?php printf('See Docs'); ?></a>
"See Docs" doesn't get translated just the alt text when I hover over it.function responsive_breadcrumb_lists () {
$home = 'Home'; // text for the 'Home' link
Could you make the home text translatableprintf( __( '<span class="%1$s">Posted on</span> %2$s by %3$s', 'responsive' ),'meta-prep meta-prep-author',
sprintf( '<a href="%1$s" title="%2$s" rel="bookmark">%3$s</a>',
get_permalink(),
esc_attr( get_the_time() ),
get_the_date()
),
Is it possible to set it up that we can change the for the format for the respective languages?grappler wrote:Hello Emil
belloli and I found a couple of Translation errors
comments.php<h6 id="comments"><?php comments_number(__('No Comments »', 'responsive'), __('1 Comment »', 'responsive'), __('% Comments »', 'responsive')); ?> for <?php the_title(); ?></h6>Can we have the for included in the stings.
Something like this<h6 id="comments"><?php comments_number(__('No Comments » for', 'responsive'), __('1 Comment » for', 'responsive'), __('% Comments » for', 'responsive')); ?> <?php the_title(); ?></h6>includes/theme-options.php<a class="help-links" href="<?php echo esc_url(__('http://themeid.com/forum/topic/510/theme-options-featured-content/','responsive')); ?>" title="<?php esc_attr_e('See Docs', 'responsive'); ?>" target="_blank"><?php printf('See Docs'); ?></a>"See Docs" doesn't get translated just the alt text when I hover over it.
functions.phpfunction responsive_breadcrumb_lists () { $home = 'Home'; // text for the 'Home' linkCould you make the home text translatable
single.phpprintf( __( '<span class="%1$s">Posted on</span> %2$s by %3$s', 'responsive' ),'meta-prep meta-prep-author', sprintf( '<a href="%1$s" title="%2$s" rel="bookmark">%3$s</a>', get_permalink(), esc_attr( get_the_time() ), get_the_date() ),Is it possible to set it up that we can change the for the format for the respective languages?
Thank you for these small changes

#: includes/theme-options.php:365 #@ responsive msgid "Instagram" msgstr "" #: includes/theme-options.php:367 #@ default msgid "instagram_uid" msgstr "" #: includes/theme-options.php:368 #@ responsive msgid "Enter your Instagram URL" msgstr ""
grappler wrote:Couldn't you use something from here for the date
http://codex.wordpress.org/Translating_WordPress#Date_Formatting_Strings
Were you able to look about the See Docs problem.
I have updated the file in the dropbox folder.
How do you create the POT files as there a a few strings like instagram_uid that do not need to be translated are in there.
Emil wrote:instagram_uid is a function, not needed to be translated, I will see what I can do about the date thing
#: includes/theme-options.php:365 #@ responsive msgid "Instagram" msgstr "" #: includes/theme-options.php:367 #@ default msgid "instagram_uid" msgstr "" #: includes/theme-options.php:368 #@ responsive msgid "Enter your Instagram URL" msgstr ""
Emil
grappler wrote:Couldn't you use something from here for the date
http://codex.wordpress.org/Translating_WordPress#Date_Formatting_Strings
Were you able to look about the See Docs problem.
I have updated the file in the dropbox folder.
How do you create the POT files as there a a few strings like instagram_uid that do not need to be translated are in there.
Emil wrote:All set please see attachment. Check and see if this covers what you need and if there's anything else as well.
Emil
P.S. Please link the dropbox for me once again too.
Emil wrote:instagram_uid is a function, not needed to be translated, I will see what I can do about the date thing
#: includes/theme-options.php:365 #@ responsive msgid "Instagram" msgstr "" #: includes/theme-options.php:367 #@ default msgid "instagram_uid" msgstr "" #: includes/theme-options.php:368 #@ responsive msgid "Enter your Instagram URL" msgstr ""
Emil
grappler wrote:Couldn't you use something from here for the date
http://codex.wordpress.org/Translating_WordPress#Date_Formatting_Strings
Were you able to look about the See Docs problem.
I have updated the file in the dropbox folder.
How do you create the POT files as there a a few strings like instagram_uid that do not need to be translated are in there.
Emil wrote:Please hold on the last responsive.pot let me do something else instead.
Emil
Emil wrote:All set please see attachment. Check and see if this covers what you need and if there's anything else as well.
Emil
P.S. Please link the dropbox for me once again too.
Emil wrote:instagram_uid is a function, not needed to be translated, I will see what I can do about the date thing
#: includes/theme-options.php:365 #@ responsive msgid "Instagram" msgstr "" #: includes/theme-options.php:367 #@ default msgid "instagram_uid" msgstr "" #: includes/theme-options.php:368 #@ responsive msgid "Enter your Instagram URL" msgstr ""
Emil
Emil wrote:Here you go: http://cl.ly/130b0g3y183Y1r1N162R/responsive.pot
The reason why we don't need to edit get_the_date() is because get_the_date() will be changed automatically once the user changes define('WPLANG', '');
I had other way around, but Otto from WordPress explained that it's not needed. So once the language is in it will call wp-includes/locale.php and translate:
April 26, 2012 to e.g. Април 26, 2012 or however the language is set to be.
Thanks,
Emil
Emil wrote:Emil
P.S. Please link the dropbox for me once again too.
grappler wrote:includes/theme-options.php<a class="help-links" href="<?php echo esc_url(__('http://themeid.com/forum/topic/510/theme-options-featured-content/','responsive')); ?>" title="<?php esc_attr_e('See Docs', 'responsive'); ?>" target="_blank"><?php printf('See Docs'); ?></a>"See Docs" doesn't get translated just the alt text when I hover over it.
#: includes/theme-options.php:242
#@ responsive
msgid "See Docs"
msgstr ""
Also see http://codex.wordpress.org/User:Skippy/Creating_POT_Filesgrappler wrote:Thank you, you have been a great help.
As you can see on this page the date is April 27, 2012 and in German it should be 27. April 2012
http://www.grappler.tk/edv-glogger/test
Emil wrote:Here you go: http://cl.ly/130b0g3y183Y1r1N162R/responsive.pot
The reason why we don't need to edit get_the_date() is because get_the_date() will be changed automatically once the user changes define('WPLANG', '');
I had other way around, but Otto from WordPress explained that it's not needed. So once the language is in it will call wp-includes/locale.php and translate:
April 26, 2012 to e.g. Април 26, 2012 or however the language is set to be.
Thanks,
Emil
The dropbox link is https://www.dropbox.com/sh/6v4jtq1oab9wi3o/UioWcoT2GJ. It also on the first post of this topicEmil wrote:Emil
P.S. Please link the dropbox for me once again too.
Were you able to look at thisgrappler wrote:includes/theme-options.php<a class="help-links" href="<?php echo esc_url(__('http://themeid.com/forum/topic/510/theme-options-featured-content/','responsive')); ?>" title="<?php esc_attr_e('See Docs', 'responsive'); ?>" target="_blank"><?php printf('See Docs'); ?></a>"See Docs" doesn't get translated just the alt text when I hover over it.
Suggestion
Would it be possible to add a Widget area just above the Header Menu so that we can add the language switcher widget there?
Question
What do you use to create the POT file? This is for my own interest.
is never used for instance.
å=å, ä=ä and ö=öthat I have been typing the codes for but I am a little unsure if I really need to. Thoughts?
Emil wrote:See Docs was already in:
Line: 1133
#: includes/theme-options.php:242 #@ responsive msgid "See Docs" msgstr ""
The European version of the date can be adjusted from http://codex.wordpress.org/Function_Ref … Parameters
I will see what I can do with the widget.
P.S. POT was hand-coded Also see http://codex.wordpress.org/User:Skippy/ … _POT_Files
Thanks,
Emil
nixx wrote:I have started translating to Swedish, although it will probably take me a little while so please be patient.
My main problem is understanding context. I haven't really figured out a good way to find the words other than looking in the referenced php-file. This doesn't always show the words in their full context though. Any pointers on this would be appreciated.
I also have a question about html character codes. I have noticed that sometimes they are used and sometimes not is never used for instance.
In Swedish we have three characterså=å, ä=ä and ö=öthat I have been typing the codes for but I am a little unsure if I really need to. Thoughts?
Can you please see that you're using the latest POT I think this was changed, can you double check and if not I will re-generate.grappler wrote:@nixx
Hey,
That's great. I think it might be easier if you joined us at https://webtranslateit.com/en/projects/3598-Responsive-Theme/ This is a great website where you can translate. I think this is a bit easier to translate then trying to do this on your computer. We are able to discuss single segments and if you join I could help you better.
As for the special characters, if you are doing it manually then I think it would be better to use the the html codes but if you did it on webtranslateit I don't think it makes a difference.
Thanks,
Ulrich
nixx wrote:I have started translating to Swedish, although it will probably take me a little while so please be patient.
My main problem is understanding context. I haven't really figured out a good way to find the words other than looking in the referenced php-file. This doesn't always show the words in their full context though. Any pointers on this would be appreciated.
I also have a question about html character codes. I have noticed that sometimes they are used and sometimes not is never used for instance.
In Swedish we have three characterså=å, ä=ä and ö=öthat I have been typing the codes for but I am a little unsure if I really need to. Thoughts?
#: includes/theme-options.php msgid "See Docs" msgstr "Siehe Dokumente"
Emil wrote:@grappler Don't worry about itCan you please see that you're using the latest POT I think this was changed, can you double check and if not I will re-generate.
Emil
grappler wrote:@Emil
I have it in the po file. If you see in the picture when I hover over the text it is in German but the Link Text isn't. That's why I thought the problem lied in the HTML in line 243.
#: includes/theme-options.php msgid "See Docs" msgstr "Siehe Dokumente"
https://www.dropbox.com/s/abm4guol6mbx7or/Untitled.jpg
Emil wrote:@grappler Don't worry about itCan you please see that you're using the latest POT I think this was changed, can you double check and if not I will re-generate.
Emil
Emil wrote:I will check again
Emil
grappler wrote:@Emil
I have it in the po file. If you see in the picture when I hover over the text it is in German but the Link Text isn't. That's why I thought the problem lied in the HTML in line 243.
#: includes/theme-options.php msgid "See Docs" msgstr "Siehe Dokumente"
https://www.dropbox.com/s/abm4guol6mbx7or/Untitled.jpg
Emil wrote:@grappler Don't worry about itCan you please see that you're using the latest POT I think this was changed, can you double check and if not I will re-generate.
Emil
grappler wrote:Hey Emil,
I just realised that there is the same problem with the "CSS Tutorial" link in the theme options as with "See Docs".
The latest German and Portuguese files have been uploaded the the dropbox folder. They would be ready for your next update.
BTW. I would be interested in Testing the update before you release it.
Ulrich
Emil wrote:I will check again
Emil
grappler wrote:@Emil
I have it in the po file. If you see in the picture when I hover over the text it is in German but the Link Text isn't. That's why I thought the problem lied in the HTML in line 243.
#: includes/theme-options.php msgid "See Docs" msgstr "Siehe Dokumente"
https://www.dropbox.com/s/abm4guol6mbx7or/Untitled.jpg

<?php printf(__('See Docs', 'responsive')); ?></a>
line 395
<?php printf(__('CSS Tutorial', 'responsive')); ?></a>
<?php $options = get_option('responsive_theme_options');
// First let's check if headline was set
if (!empty($options['cta_url']) && $options['cta_text']) {
echo '<a href="'.__($options['cta_url'],'responsive').'" class="blue button">';
echo __($options['cta_text'],'responsive');
echo '</a>';
?>
#: home.php msgid "Call to Action English" msgstr "Call-to-Action Deutsch"
function responsive_setup() {
load_child_theme_textdomain('responsive', get_stylesheet_directory().'/languages');
$locale = get_locale();
$locale_file = get_template_directory().'/languages/$locale.php';
if (is_readable( $locale_file))
require_once( $locale_file);
}
<?php $options = get_option('responsive_theme_options');
// First let's check if headline was set
if (!empty($options['cta_url']) && $options['cta_text']) {
echo '<a href="'.__($options['cta_url'],'theme-options').'" class="blue button">';
echo __($options['cta_text'],'theme-options');
echo '</a>';
?>
add_action( 'after_setup_theme', 'theme_options_language' );
function theme_options_language() {
load_child_theme_textdomain('theme-options', get_stylesheet_directory().'/languages');
$locale = get_locale();
$locale_file = get_template_directory().'/languages/$locale.php';
if (is_readable( $locale_file))
require_once( $locale_file);
}
Emil wrote:@commercial thank you so much that would be great! @grappler can you please help him with an invite?
I will check why the Theme Options translation parts are not acting the way they should.
Emil
grappler wrote:Hey Emil,
Commercial has already started translating to French. Please take your time reading this post as I believe it will be interesting.
Solution 1
I have found the solution for See Docs and CSS Tutorial and here it is...
theme-options.php
line 243<?php printf(__('See Docs', 'responsive')); ?></a>line 395<?php printf(__('CSS Tutorial', 'responsive')); ?></a>
Solution 2
I have also found a solution to the problem of having a multiligual hompage.
For the example I will use the Call for Action text. So to make the options translatable you need to add __ before $options like below.
<?php $options = get_option('responsive_theme_options'); // First let's check if headline was set if (!empty($options['cta_url']) && $options['cta_text']) { echo '<a href="'.__($options['cta_url'],'responsive').'" class="blue button">'; echo __($options['cta_text'],'responsive'); echo '</a>'; ?>
Then type the English version of Call for Action text in the themes options. Then add the following to the po file#: home.php msgid "Call to Action English" msgstr "Call-to-Action Deutsch"
This way it is possible to have the homepage in two languages very easily.
The way I would impliment this on my site is to copy the language folder to my Child theme.
Add then add the following code to the functions.php in the child theme.function responsive_setup() { load_child_theme_textdomain('responsive', get_stylesheet_directory().'/languages'); $locale = get_locale(); $locale_file = get_template_directory().'/languages/$locale.php'; if (is_readable( $locale_file)) require_once( $locale_file); }
Then I would edit the language files in the child theme to add the translations.
I think opens up a number of different possibilities.
Taking it further
Here is where it gets interesting
So what if I want to have a separate po for my theme options translation.
So instead of using responsive as the text domain we could use theme_options
<?php $options = get_option('responsive_theme_options'); // First let's check if headline was set if (!empty($options['cta_url']) && $options['cta_text']) { echo '<a href="'.__($options['cta_url'],'theme-options').'" class="blue button">'; echo __($options['cta_text'],'theme-options'); echo '</a>'; ?>
Then you would add the following code to the child theme function.php.
add_action( 'after_setup_theme', 'theme_options_language' ); function theme_options_language() { load_child_theme_textdomain('theme-options', get_stylesheet_directory().'/languages'); $locale = get_locale(); $locale_file = get_template_directory().'/languages/$locale.php'; if (is_readable( $locale_file)) require_once( $locale_file); }
At the end you could add your single translations just for your theme options without changing anything to the parent theme and this allows it to be updated without any negative effects.
Please let me know what you think
I am really looking forward to the next update.
Let me know if you have any questions.
Thanks for your great work
Ulrich
I bit of information on Child Theme Translation
Emil wrote:@commercial thank you so much that would be great! @grappler can you please help him with an invite?
I will check why the Theme Options translation parts are not acting the way they should.
Emil
grappler wrote:For WPML
I haven't tested myself as I have only the basic version.
commercial wrote:grappler wrote:For WPML
I haven't tested myself as I have only the basic version.
Emil as theme developer should have a free licence, or ask it for you as dev team member,
just request it to Amir.
I've a full WPML licence, but not the necessary free time to conduct this test.
As alternative solution, PM me if you need it, I can install it on your test domain.
#: includes/theme-options.php:367 #@ default msgid "instagram_uid" msgstr ""

Emil wrote:Thank you I sure will
Emil
commercial wrote:grappler wrote:For WPML
I haven't tested myself as I have only the basic version.
Emil as theme developer should have a free licence, or ask it for you as dev team member,
just request it to Amir.
I've a full WPML licence, but not the necessary free time to conduct this test.
As alternative solution, PM me if you need it, I can install it on your test domain.
#: search.php:28 #@ responsive msgid "<span class=\"post-search-terms\">" msgstr "" #: search.php:30 #@ responsive msgid "</span><!-- end of .post-search-terms -->" msgstr ""

Google+
commercial wrote:The french file in dropbox is an corrupted html file, you can delete it
I made some changes due several french caracteres, the plateform don't take care of it
I made some modification, but have to check it again.
(I definitly prefer edit++ for massive transformation
For Google+ , the main code have probably to be:Google+
That's why it breaks. I just received Italian version as well. Rating doesn't work the way it should Otto from WordPress knows about it and when he finds free time it will be solved.grappler wrote:Hey,
Here everything seems to be working well here. Could you be a bit more specific was is not displaying properly.
As for the two French files in my dropbox they are fine. You can only edit the .po file in a text editor and not the .mo file. The .mo file is created from the .po file.
Thanks
Ulrich
commercial wrote:The french file in dropbox is an corrupted html file, you can delete it
I made some changes due several french caracteres, the plateform don't take care of it
I made some modification, but have to check it again.
(I definitly prefer edit++ for massive transformation
For Google+ , the main code have probably to be:Google+
Emil wrote:It's due to longer textThat's why it breaks. I just received Italian version as well. Rating doesn't work the way it should Otto from WordPress knows about it and when he finds free time it will be solved.
Emil
grappler wrote:Hey,
Here everything seems to be working well here. Could you be a bit more specific was is not displaying properly.
As for the two French files in my dropbox they are fine. You can only edit the .po file in a text editor and not the .mo file. The .mo file is created from the .po file.
Thanks
Ulrich
commercial wrote:The french file in dropbox is an corrupted html file, you can delete it
I made some changes due several french caracteres, the plateform don't take care of it
I made some modification, but have to check it again.
(I definitly prefer edit++ for massive transformation
For Google+ , the main code have probably to be:Google+
It looks like you're new here. If you want to get involved, click one of these buttons!