2

I'm building out a multilingual site (English and French) with a discussion forum. The multilingual aspect of the site is being powered by Transcribe and is working great.

I'm in the middle of setting up my forums and have them skinned correctly. There are two boards with unique urls one for English and one for French. Is it possible to set the language pack to French when visiting the french forum by default. Currently it's English and when a new visitor comes in French the registration forms and login forms are in English with no way to change them to French that I can find. At least until after the user has successfully registered, logged in and edits their profile.

I've looked all through the forums CP and can't find a way to do this.

  • What do the language-specific URLs look like? – dbigca Jan 10 '13 at 0:09
  • domain.com/en/dicuss for the English forums and domain.com/fr/forum for the French forums – CreateSean Jan 10 '13 at 15:15
2

I submitted a support request about this and Robin Sowell was able to get me all sorted out. Here is what needs to be done.

Now what this does is grab everything in the url after the domain name. Well- it should if request_uri is supported. And then it breaks that into parts, splitting it at the ‘/’.

So any url that has just fr as a segment, it should trigger the language override.

The code added to the index.php file is below:

if (isset($_SERVER['REQUEST_URI']) && strpos($_SERVER['REQUEST_URI'], '/fr') !== FALSE) { $segs = explode('/', $_SERVER['REQUEST_URI']);

if (in_array('fr', $segs))
{
    // Language override
    $assign_to_config['deft_lang'] = "french";
}
}
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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