ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Looking for advice on segment to best achieve multi-lingual on an existing site

July 26, 2011 12:38pm

Subscribe [2]
  • #1 / Jul 26, 2011 12:38pm

    John St-Amand

    865 posts

    HI there all - I’m looking for some advice on how to best go about using a segment to achieve multi-langual in an existing site.  In my mind, it would make most sense to have the language designator be the first segment of the site.  So domainname.com/en/ for english or domainname.com/fr/ for french.  I’m only dealing with those two languages - and since that’s expected to be the case permanently, I could simply make it that the language segment is only needed for the french content.  But i would like to accomplish it with the following set of circumstances:

    1) since the site was already set up, the way i devised for the multilingual entries to be handled is that I added a language selector (a radio button) to every entry screen in the existing channels.  This way, french and english content doesn’t have to be entered at the same time and I can leave the set of required custom fields as they were already.  So to display french or english content, I would simply add the search parameter to my entries tags to filter english versus french.  I also have the english version of a given entry linked to its french equivalent entry with a relationship field so that i can link directly back and forth between them.

    2) It’s my intention to use the same templates for english and french content - the client does not see any need for the URL structure to be bilingual and I don’t really want to duplicate the templates unless I have to.

    3) I have not removed index.php from the URLs (yet)

    So my main question is how do I use the first segment of the site as a language selector and not have it interacting with EE’s usual structure of segment one being a template group and segment 2 being a template name?  I already have a series of template groups and templates set up that I would like to maintain?  Is it an htaccess exercise?  Or is there an add-on that I should be using to permit this template group / template behaviour?

  • #2 / Jul 29, 2011 12:06pm

    Emily Heath

    197 posts

    You don’t say if you’re on v1 or v2 but check out Biber’s http://devot-ee.com/add-ons/multi-language-support/ for EE2. I have been considering using it, but probably won’t because my site is optionally transated, so i’m choosing to put language modifying segment at the end of my URLs.  If I were going for at the beginning like you, I think this might save a lot of work.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases