Originally presented at Engine Summit - The online ExpressionEngine Summit March, 30th 2010 I tackled the popular topic of how to handle Multi-Language websites in ExpressionEngine
@johnhenry_ie PAGE 2 Introduction John Henry tackles this popular topic of multi-language websites developed in ExpressionEngine. He discusses the practicalities of client profiling and technical approaches. He shows what is possible out of the box and how to extend functionality using some of the popular add-ons available. Each approach and technique will hopefully deliver a wealth of ideas and tips that should give you a head start when building your first multi-lingual website in ExpressionEngine.
@johnhenry_ie PAGE 3 Profiling • • What does your client want from a multi-language website? • • Who will be updating the website? • • Do they need the ability to add more languages? • • What type of domain are we working with? • • What type of multi-language website is needed? Client Ability and needs
@johnhenry_ie PAGE 4 Profiling Deciding on the type of website is a very simple step which is often forgotten when developing a multi-language website. There are in fact 2 different types of websites you can choose from. Versions Multiple translated versions Translations 1 version and multiple translations Type of website
@johnhenry_ie PAGE 7 Technical Approach Templates Tags {exp:weblog:entries weblog=”{master_weblog}”} <h2 class=”title”>{if country_code != “en”}{{country_code}_title} {if:else}{title}{/if}</h2> {{country_code}_summary} {{country_code}_body} {/exp:weblog:entries} Add the country code to all of your custom fields en_body, es_body etc.
@johnhenry_ie PAGE 9 Structure (Third Party Add-on) Structure is a different way to build ExpressionEngine sites. It forgoes the current template_group/template setup and creates‘static’ and ‘listing’ pages that are all editable through a tree sitemap view. http://buildwithstructure.com/ “
@johnhenry_ie PAGE 12 Structure (Third Party Add-on) {if segment_1 ‘es’ OR segment_1 ‘fr’} {!-- START FROM SEGMENT 2 IF NOT DEFAULT LANGUAGE --} {exp:structure:nav_sub start_from=’/{segment_1}/{segment_2}’} {if:else} {!-- START FROM SEGMENT 1 IF DEFAULT LANGUAGE --} {exp:structure:nav_sub start_from=’/{segment_1}’} {/if} Example nav_sub code
@johnhenry_ie PAGE 13 LG Multi Language Pro (Third Party Add-on) Developed by Leevi Graham of Newism Web design & Development. The add-on bundle was commissioned by myself to suit a particular client’s needs and workflow. It will hopefully be released back into the community by Leevi. http://newism.com.au/ • • Based on member group, hide unnecessary custom fields • • Needed a way of showing the status of a translation • • A phrase translator with separate plugin Background & Design Brief