Jump to content
Sign in to follow this  
matthewshore

Multi language iBlogPro

Recommended Posts

matthewshore

Hi, So: I am using the iBlogPro theme to build our corporate site. We have the requirement that the site is in multiple languages, and I have installed WPML for this purpose. It works very well for most of the site, BUT, I can't seem to find a way to translate the feature page. None of the strings on this page appear in the plugin translation pages after it scans the site for translatable strings. Is there something I'm missing? or is there a workaround? It's a shame, because otherwise this is a great theme, which has allowed us to create a really nice looking site. Cheers Matthew

Share this post


Link to post
Share on other sites
cmunns

This sounds like a problem with the plugin itself. You'd be better off asking the creators of the plugin why that text isn't translating like the rest. WPML forum If they can't help you let me know and I'll do some investigating with their plugin.

Share this post


Link to post
Share on other sites
matthewshore

can you tell me what make the home page so different to the rest of them? From what i understand, it has something to do with gettext, or something? I dont think its only this plugin that has a problem with this page; i have read another post saying that they tried three different ones- wpml, qtranslate, and one other. I'll ask on their forums, and see if they can shed any light... Cheers

Share this post


Link to post
Share on other sites
Andrew

as far as translation... you set the text for your feature page in the 'feature setup' option area... what else would you like translated? Are you trying to translate it based on the location of your users? Finally, if that's the case (same text; multiple languages); we may have to wrap the function output in something like a `gettext` function...

Share this post


Link to post
Share on other sites
matthewshore

yeah, we want the user to be able to switch languages, based on their preference or location, so the site is currently in english, french, russian, chinese and arabic. I asked on the WPML forum, and they said that it needs to be, as you said also, wrapped in a gettext function. So, next question: Bearing in mind that I have very little knowledge of programming, so your explanation will have to be idiot proof, how do I do that? :) BTW the site is here, on a staging server http://www.moveoneinc.com/stage2 You can see the language switcher, etc.

Share this post


Link to post
Share on other sites
matthewshore

so same text, multiple languages

Share this post


Link to post
Share on other sites
Andrew

looks like we need to wrap the text output in the template. what function do you need to use to process your stuff?

Share this post


Link to post
Share on other sites
matthewshore

gettext, i think... like i said, im a bit of a novice at this.

Share this post


Link to post
Share on other sites
jnoh

You'll want to open up the "includes/pro/template_feature.php" file and wrap $feature['title'] and $feature['text'] with the gettext function.

Share this post


Link to post
Share on other sites
matthewshore

So, because the $feature title is an array the individual titles don't actually 'exist' when the gettext runs... It doesn't appear in the strings. but, if you declare a single variable then it works, and it shows up in the string translation part. Any ideas how to get around this? you can see on the site now: one title is a control, with no gettext, the second title is wrapped in a gettext, and the 'NameMO' is a single variable, wrapped in gettext. the latter appears in the string translations, and changes depending on the language you select. moveoneinc.com/stage2

Share this post


Link to post
Share on other sites
jnoh

Matthewshore, can you set a single variable to the $feature['title'] prior to placing it in the gettext function. ` $titletext = $feature['title'] gettext($titletext) ` Let me know if that works.

Share this post


Link to post
Share on other sites
Andrew

This is a duplicate post... wonder which one to keep?

Share this post


Link to post
Share on other sites
matthewshore

yeah, i don't know... i got good answers from both! lets stick with this one...

Share this post


Link to post
Share on other sites
matthewshore

this is how we have done the feature title:

<?php echo $feature['title'];?>
	<?php _e($feature['title'], TDOMAIN); ?>
	<?php _e('NameMO', 'wpml_theme'); ?>

Share this post


Link to post
Share on other sites
matthewshore

what would be ideal is if each of the fields in the feature setup would be passed through the gettext function...

Share this post


Link to post
Share on other sites
Andrew

did you try this: <?php _e($feature['title'], 'wpml_theme'); ?> yes, we would do that... we just need to find out where they should be passed through; if its not working in the template.

Share this post


Link to post
Share on other sites
matthewshore

actually, I think we have solved it. Not quite sure how, one of my colleagues figured it out. I will post the solution here shortly... take a look at the site to see it in action! Thanks for the invaluable help. www.moveoneinc.com/stage2

Share this post


Link to post
Share on other sites
Andrew

that would be excellent. Thanks

Share this post


Link to post
Share on other sites
fraank

hi mattewshore I??m exactly stuck at the same problem now and I saw on you site that you have solved the problem with WPML. Can you give a short tutorial on how you did this ? Thanks for any help. F

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

×