I am building a custom solution that would be bilingual in English and French. I want to store the French content, title,... in custom metas by adding META BOXES to the edit screen. This part is fine, I can take care of it without a probalem.
I can detect the language of the user by using
substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2); no big deal here either.
Now, depending on the user's language I want the loop to server either the main content ( you know
the_title(),... ) or the translated version by running some filter.
Which code would I have to code in the plugin or functions.php ?