Jump to content


Photo
- - - - -

How to translate Feature and Feature box


This topic has been archived. This means that you cannot reply to this topic.
11 replies to this topic

#1 miber

miber

    Newbie

  • Members
  • Pip
  • 5 posts

Posted 18 January 2010 - 09:22 PM

Hi, Is it possible to translate the title and text for the features and feature boxes into different langugages? I have tried this with both the "CodeStyling Localization" plugin and the "WPML Multilingual CMS" plugin. But they don't seem to find the strings I want to translate. Thank you in advance, Michael

#2 arpowers

arpowers

    Founder

  • Administrators
  • 3254 posts

Posted 18 January 2010 - 11:55 PM

Do you just want it to show up in a different language? or different languages depending on who's looking at it?

#3 miber

miber

    Newbie

  • Members
  • Pip
  • 5 posts

Posted 19 January 2010 - 07:56 AM

Different language depending on who's looking at it. The site will have a language switch in the header. We will probably use WPMP Multilingual CMS plugin since it seems easy to use. If the user goes to

Please Login or Register to see this Hidden Content

the site will be in german (and hopefully the feature boxes as well). If the user goes to

Please Login or Register to see this Hidden Content

the site will be in swedish.

#4 miber

miber

    Newbie

  • Members
  • Pip
  • 5 posts

Posted 19 January 2010 - 02:54 PM

Using the translation plugin "qTranslate" I managed to translate the Feature Text by typing:

Please Login or Register to see this Hidden Content

On the other hand, this plugin does not seem to be able to translate the Theme strings. Any suggestions helping me translate the whole site (pages, posts, theme, date formatting etc) are appreciated.

#5 trevis

trevis

    Newbie

  • Members
  • Pip
  • 6 posts

Posted 21 February 2010 - 09:10 PM

I need to do exactly the same thing. Have you had any progress on that? Have you managed to put the list of languages in the header of the site? How did? I changed the default language of my computer, but it seems that the WPML only changes the language to access the correct address (mysite.com/en or mysite.com/es). I wish that when anyone from accessing mysite.com him to add the /en or /es according to the language of the visitor. Do you know if this is possible? Regards, Rafael Trevisan rafael@trevis.com.br

#6 matthewshore

matthewshore

    Member

  • Members
  • PipPip
  • 13 posts

Posted 06 March 2010 - 09:21 PM

seconded... anyone got a solution to this?? essentially, i can translate the rest of my site using wpml, but i cant do the home page, ie the features boxes and the feature... seems a bit bizzarre that these don't show up as strings with the rest of the site.

#7 arpowers

arpowers

    Founder

  • Administrators
  • 3254 posts

Posted 12 March 2010 - 06:57 PM

there is probably a wrapper function that needs to be added... I'll take a look at WPML; and see what's need.

#8 arpowers

arpowers

    Founder

  • Administrators
  • 3254 posts

Posted 12 March 2010 - 07:40 PM

ahhhh... I see. the output functions in the feature templates need to be wrapped in '_e()' functions. so in something like "template_feature.php" change this type output: `` to this: ``

#9 arpowers

arpowers

    Founder

  • Administrators
  • 3254 posts

Posted 12 March 2010 - 07:40 PM

gettext consists of the _e() and __() functions you see through out the theme.

#10 matthewshore

matthewshore

    Member

  • Members
  • PipPip
  • 13 posts

Posted 16 March 2010 - 04:46 PM

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

#11 arpowers

arpowers

    Founder

  • Administrators
  • 3254 posts

Posted 16 March 2010 - 05:26 PM

hmm.. Ok how did you go about wrapping the NameMO part?

#12 matthewshore

matthewshore

    Member

  • Members
  • PipPip
  • 13 posts

Posted 17 March 2010 - 08:15 AM

Please Login or Register to see this Hidden Content