Multi Language Support
I'm looking to create a bi lingual site (English and French) and need to be able to enter ads in both languages at the same time and then display the appropriate version dependent on a language switch.
So far this is where I am:
I've installed qTranslate
Created custom fields for french title and french content and a form with these, title, content and price.
I've hacked at step-functions.php to get this
$newtitle = "<!--:en-->".cp_filter($advals['post_title'])."<!--:--><!--:fr-->";
$newtitle = $titleen.cp_filter($advals['cp_french_title'])."<!--:-->";
$new_ad['post_title'] = $newtitle;
$newcontent = "<!--:en-->".trim($advals['post_content'])."<!--:--><!--:fr-->";
$newcontent = $newcontent.cp_filter($advals['cp_french_content'])."<!--:-->";
$new_ad['post_content'] = $newcontent ;
At this stage it's doing what I need - it's for a single user to enter ads and the lanuages are fixed.
The only issue at the moment is whilst the single ad display is correct when there's a list it strips the tags in the content so it shows both versions of the content - I haven't looked into this yet.
So anyone with any tips/advice on how to proceed?
If not then hopefully this is a start for others.