Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I'm working on a CPT Portfolio to present my job

I wish to be able to have it in 2 languages but I would prefer not to use an additional plugin since that is only 2 fields that would be in 2 language

my idea is :

on the back office of this CPT

  • remove original excerpt
  • remove original text editor

  • create a custom meta box for language 1

  • add to this meta box a custom text area 'intro language 1'
  • add to this meta box a custom text editor 'intro language 1'

  • create a custom meta box for language 2

  • add to this meta box a custom text area 'intro language 2'
  • add to this meta box a custom text editor 'intro language 2'

on the front end

  • have a lang switcher with a cookie
  • use the correct PO/MO file according to lang
  • call the right text area / text editor content according to the lang

is that the correct way to do it?

Thank you in advance for all your help, I'm just scratching the admin section customisation

share|improve this question
add comment

1 Answer

This is quite a lot of work. I don't think you can code that in a reasonable amount of time.

You could use a multi-site setup and a plugin to map single posts and pages as language alternatives to each other. The plugin Multilingual Press does exactly that and all the other points you listed. The pro version allows you to edit all language variants on one page.

And when you disable the plugin everything will still work; so there is no risk trying it.

Disclosure: I am now a coauthor for that plugin.

share|improve this answer
    
Thank you toscho, I will investigate the multilingual press for a bigger project. For my portfolio I do believe it is a bit overkill to add only 4 extra fields (the additionnal languages).. also I would like th have the languages (FR/EN) in the very same meta box.. I understand it is a bit of work, but not that much, or I have probably miss something... btw do you have experience to install multilingall press on an already existing multi site network? thank you again –  Steffy Kristiensen Apr 1 '13 at 8:02
    
You can install MLP on an existing network; that's not a problem. Getting everything right is a lot of work. Just look at the source code of that plugin. –  toscho Apr 1 '13 at 8:09
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.