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.

multi locale site advice?

October 18, 2012 6:19am

Subscribe [3]
  • #1 / Oct 18, 2012 6:19am

    wbjp

    89 posts

    Hi, I’m wondering if someone could advise me on the best approach to take, I’m stuck. 

    The company I’m building a site for has 1 domain but offices in the USA, Australia and Japan (offices in other countries soon)and they want each office to have it’s own site section so staff can publish unique content in their own language. Templates can be the same for each office.

    Thanks

     

  • #2 / Oct 22, 2012 6:51pm

    e-man

    1816 posts

    This depends largely on how extensive those different ‘sections’ are.
    Are we talking 1 page or a complete subsite per locale?

    In that case you may want to look at using a multi-site install http://ellislab.com/expressionengine/user-guide/cp/sites/index.html with subdomains http://ellislab.com/expressionengine/user-guide/cp/sites/domainsetup.html

    If it’s just a simple page it could be as simple as setting up a channel and a template group per locale. Just my 2c.

  • #3 / Oct 23, 2012 3:53pm

    DesignBloke

    63 posts

    Let me just say off the bat that my EE 2 experience is limited, the following is based on a large site I did in EE 1:

    The way I’ve handled this in the past was to completely design the site for one region. Then I went back through the code and replaced any reference to a specific region with variables. Each region had about ten variables declared at the top of each page. This allowed the pages to be local to the end user, but still only have one page of code. Then I created different template groups for each region (i.e. usa, australia, and japan). Each template group contains the same code in each template with only the variable declarations changing.

    To manage your images, keep all universal images in one place (i.e. yoursite.com/graphics/). Then any images that will change from site to site should share the exact same name and pixel dimension.  The only change is that they are in a region specific subfolder of your main graphics folder (i.e yoursite.com/graphics/usa/). You then reference that graphic with one of the variables you defined (i.e. yoursite.com/graphics/{region}/logo.jpg).

    How you structure the actual content of your site will depend greatly on how much content there will be. If you want fewer weblogs to maintain, you can use one weblog across multiple regions by offering a drop down where the content editor can select a region. Then when displaying the content you display only the region that is defined for that template group. (i.e. search:region_customfieldgroup=”{region}”). Using the same weblog across multiple regions works technically, but if they do not speak the same language in all regions, your content entry instructions may not help the content editor.

    Having 4 sets of identical template groups that all must be updated any time you make a change won’t be that bad. Having 24 probably will be. If you need to streamline the process, you can enable php parsed at imput (security implications there) and upload all your variables (named for the region) to one folder and all templates (generic) to another. Then do a standard php embed on the actual template file within EE. Like this:

    <?php include_once ("includes/variables/usa.php"); ?> 
    <?php include_once ("includes/templates/contact_info.php"); ?>

    That would allow you to update for instance the contact info page and pass the changes to all regions. At least in EE 1, you will give up a few things with a php embed. For instance, if you are embedding php files with the above method, you can not use {current_time} within your template. It won’t get processed.

    I’ll cut off my long response there. Feel free to ask me more questions if any of this is helpful to you.

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

ExpressionEngine News!

#eecms, #events, #releases