SlideShare une entreprise Scribd logo
1  sur  31
Multi-lingual Websites in Umbraco A Case Study of Savant.AECom.com Paul Marden Director
Background This is a practical case study, not intended to be a demonstration of best practice. Project was to migrate an existing ASP / Flash site from a proprietary CMS to Umbraco. Aim was to provide a functionally equivalent front-end that required the minimum amount of rework of the Flash components.
About the client Savant is an international construction company with 20 offices across  13 countries in Europe and Central Asia. Their site provides all primary content in  English and Russian, with 11 regional office micro-sites in English and that country’s language. In all cases there is a 1-to-1 match between English / Russian nodes or English / 3rd Language nodes.
Specs Built on 4.0.0 RC1 and currently deployed on 4.0.1 Running on Fasthosts dedicated server; Windows Server 2003 Web Edition SQL Server 2005 Express Edition ~320 nodes, 22 document types, 28 templates & 23 macros
Flash integration The site uses Flash movies extensively to display content in an attractive way. Much is legacy code inherited from the existing version of the site/cms. We made use of sIFR v3 to render page headers and menu’s. Started with fonts generated by sIFR Generator but reverted to creating the sIFR font file in Flash – not all Cyrillic fonts are the same!
Approaches to multilingual sites After some research  there seemed to be two design patterns for multi-lingual sites: Multi-lingual 1:1 sites (as written about by Torleik) Separate branches for each language We ended up with a compromise between both!
Separate host names Originally designed to separate out English and Russian pages with two root nodes.  In the dev version these had separate host names and languages (best practice?). Also required configuration of IIS to route traffic to the appropriate Website! An advantage of this was that we could have Cyrillic URL’s  giving better SEO.
Information Architecture
But... Existing Flash movies for News, Projects etc, needed EN & RS in the same XML feed, so we needed a way of retrieving EN & RS for News Item 1, News Item 2 etc. URLs with Cyrillic's broke the movies and rendered rather strangely when pasted into emails... http://rs.savant.capbuild.com/%D0%BE%D0%BF%D1%8B%D1%82-%D1%80%D0%B0%D0%B1%D0%BE%D1%82%D1%8B.aspx We kept the separate root nodes for EN and RS, but gave up on Cyrillic URLs and also didn’t implement separate host names.  Instead naming pages e.g. Experience.aspx and ExperienceRS.aspx ! This was a bad design decision !
Relating nodes Each page on the site has to relate together EN and RS content, so that it was possible to flick between different language versions of the page. We achieved this using a content picker field on each doc type. Within the template we call a macro to insert the link to the other page: <xsl:variable name=“link” select=“$currentPage/data[@alias='LinkedPage‘]”/> <xsl:if select=“$link != ‘’"> 	<a href="{umbraco.library:NiceUrl($link)}">English</a> </xsl:if>
Listing pages The site consists of four “database” like document types.  These hold job opportunities, projects completed, press releases and office locations. Each is output on a listing page.  This page contains a paged static HTML version of the items, as well as a call to a Flash movie which retrieves the items as an XML file to display a prettier version. We began with separating out the list item nodes by language, but the users found this difficult to manage, so we reverted to a 1:1 multilingual pattern.
Listing pages (templates & macros) Each listing has an HTML view and an XML view. In order to retain backwards compatibility with existing Flash movie we implemented two pages e.g. news.aspx and getNewsXML.aspx.  Each had their own Document Type, Template and Macro for retrieving list items. Although were it to be a virgin site, I would have gone for one page, with two templates then used ?alttemplate=othertemplate
Plan was deploy to Savant’s shared server architecture. But once deployed we found this was a medium trust environment. So the day before planned go live we bought a Fasthosts dedicated server. Implementation Pains
Dictionary In the latest edition of the site we’ve implemented translation using the Umbraco dictionary. This makes use of the Languages defined for the site to display a neat interface (in U4) that display words to be translated. Functions are then available in umbraco.library to  insert a translated value for a certain keyword. This reduces the number of macros in the site, simplifies them, and provides a better editors interface.
Standard dictionary access  In a macro to retrieve a translated value use: <xsl:value-of select=“umbraco.library:GetDictionaryItem(‘Aviation’)”/>    Which returns a string containing the translated value using the current language context. ,[object Object],[object Object]
Orcare Dictionary Access (part 1) <msxsl:script language="C#" implements-prefix="orcare">    <![CDATA[    public string GetDictionaryItemByContext(string key, intlanguageId)    {        return new umbraco.cms.businesslogic.Dictionary.DictionaryItem(key).Value(languageId);    }    ]]></msxsl:script> Error in XSLT at line 233, char 20231:       public string GetDictionaryItemByContext(string key, intlanguageId)232:       {233: >>>   return new umbraco.cms.businesslogic.Dictionary.DictionaryItem(key).Value(languageId); <<<234:       }
Swag Alert
Orcare Dictionary Access (part 2) So we built our own library which can be called from XSL files. Based on very old notes from Wikibooks. Create a new project Create a class (OrcareLib) Import all the necessary parts of the Umbraco API Create your methods
Public Class OrcareLib    Public Shared Function GetDictionaryItemByLanguageId(ByVal    key As String, ByVallanguageId As Integer) As String         Dim d As New Dictionary.DictionaryItem(key) GetDictionaryItemByLanguageId = d.Value(languageId)     End Function    Public Shared Function GetDictionaryItemByCultureCode(ByVal key As String, ByValcultureCode As String) As String         Dim d As New Dictionary.DictionaryItem(key)         Dim l As Language         l = Language.GetByCultureCode(cultureCode) GetDictionaryItemByCultureCode = d.Value(l.id)    End Function End Class Orcare Dictionary Access (part 2)
Build the project, and copy the dll into the /bin folder in umbraco Register the library in /config/xsltExtensions.xml <ext assembly="/bin/OrcareLib" type="com.orcare.OrcareLib" alias="orcare.library" /> Add the library into the head of any XSL files xmlns:orcare.library ="urn:orcare.library" exclude-result-prefixes="msxmlumbraco.libraryorcare.library” Call the new methods <xsl:value-of select=“orcare.library:GetDictionaryItemByCultureCode (‘Aviation’,’ru-ru’)”/> Orcare Dictionary Access (part 2)
Think more carefully about how you architect the site. 1:1 may be easier for your users, but breaks the dictionary. Separate hostnames for separate languages gives much better flexibility, but can be confusing for editors. But the editors still love the editing experience in Umbraco, even with the compromises we made. If you are planning to deploy to a new environment test it early to make sure it’s suitable. Parting shots
Multi Lingual Websites In Umbraco

Contenu connexe

Tendances

ASP.NET MVC Performance
ASP.NET MVC PerformanceASP.NET MVC Performance
ASP.NET MVC Performancerudib
 
Introduction to ASP.NET
Introduction to ASP.NETIntroduction to ASP.NET
Introduction to ASP.NETPeter Gfader
 
C# ASP.NET WEB API APPLICATION DEVELOPMENT
C# ASP.NET WEB API APPLICATION DEVELOPMENTC# ASP.NET WEB API APPLICATION DEVELOPMENT
C# ASP.NET WEB API APPLICATION DEVELOPMENTDr. Awase Khirni Syed
 
ClubAJAX Basics - Server Communication
ClubAJAX Basics - Server CommunicationClubAJAX Basics - Server Communication
ClubAJAX Basics - Server CommunicationMike Wilcox
 
ASP.NET Presentation
ASP.NET PresentationASP.NET Presentation
ASP.NET Presentationdimuthu22
 
NServicebus WCF Integration 101
NServicebus WCF Integration 101NServicebus WCF Integration 101
NServicebus WCF Integration 101Rich Helton
 
Introduction to asp.net
Introduction to asp.netIntroduction to asp.net
Introduction to asp.netSHADAB ALI
 
DevNext - Web Programming Concepts Using Asp Net
DevNext - Web Programming Concepts Using Asp NetDevNext - Web Programming Concepts Using Asp Net
DevNext - Web Programming Concepts Using Asp NetAdil Mughal
 
ASP.NET - Introduction to Web Forms and MVC
ASP.NET - Introduction to Web Forms and MVCASP.NET - Introduction to Web Forms and MVC
ASP.NET - Introduction to Web Forms and MVCBilal Amjad
 
Asp Net Advance Topics
Asp Net Advance TopicsAsp Net Advance Topics
Asp Net Advance TopicsAli Taki
 
The complete ASP.NET (IIS) Tutorial with code example in power point slide show
The complete ASP.NET (IIS) Tutorial with code example in power point slide showThe complete ASP.NET (IIS) Tutorial with code example in power point slide show
The complete ASP.NET (IIS) Tutorial with code example in power point slide showSubhas Malik
 

Tendances (20)

ASP.NET MVC Performance
ASP.NET MVC PerformanceASP.NET MVC Performance
ASP.NET MVC Performance
 
Introduction to ASP.NET
Introduction to ASP.NETIntroduction to ASP.NET
Introduction to ASP.NET
 
ASP.NET Lecture 1
ASP.NET Lecture 1ASP.NET Lecture 1
ASP.NET Lecture 1
 
C# ASP.NET WEB API APPLICATION DEVELOPMENT
C# ASP.NET WEB API APPLICATION DEVELOPMENTC# ASP.NET WEB API APPLICATION DEVELOPMENT
C# ASP.NET WEB API APPLICATION DEVELOPMENT
 
Introduction to asp.net
Introduction to asp.netIntroduction to asp.net
Introduction to asp.net
 
Flash And Dom
Flash And DomFlash And Dom
Flash And Dom
 
ClubAJAX Basics - Server Communication
ClubAJAX Basics - Server CommunicationClubAJAX Basics - Server Communication
ClubAJAX Basics - Server Communication
 
ASP.NET Presentation
ASP.NET PresentationASP.NET Presentation
ASP.NET Presentation
 
MERN stack roadmap
MERN stack roadmapMERN stack roadmap
MERN stack roadmap
 
NServicebus WCF Integration 101
NServicebus WCF Integration 101NServicebus WCF Integration 101
NServicebus WCF Integration 101
 
Introduction to asp.net
Introduction to asp.netIntroduction to asp.net
Introduction to asp.net
 
DevNext - Web Programming Concepts Using Asp Net
DevNext - Web Programming Concepts Using Asp NetDevNext - Web Programming Concepts Using Asp Net
DevNext - Web Programming Concepts Using Asp Net
 
Asp.net
 Asp.net Asp.net
Asp.net
 
ASP.NET - Introduction to Web Forms and MVC
ASP.NET - Introduction to Web Forms and MVCASP.NET - Introduction to Web Forms and MVC
ASP.NET - Introduction to Web Forms and MVC
 
MVC - Introduction
MVC - IntroductionMVC - Introduction
MVC - Introduction
 
Asp Net Advance Topics
Asp Net Advance TopicsAsp Net Advance Topics
Asp Net Advance Topics
 
The complete ASP.NET (IIS) Tutorial with code example in power point slide show
The complete ASP.NET (IIS) Tutorial with code example in power point slide showThe complete ASP.NET (IIS) Tutorial with code example in power point slide show
The complete ASP.NET (IIS) Tutorial with code example in power point slide show
 
ASP
ASPASP
ASP
 
Asp.net basic
Asp.net basicAsp.net basic
Asp.net basic
 
Asp.net
Asp.netAsp.net
Asp.net
 

En vedette

An Introduction to Umbraco
An Introduction to UmbracoAn Introduction to Umbraco
An Introduction to UmbracoJeremy Branham
 
"Umbraco MVC - a journey of discovery" - Lotte Pitcher
"Umbraco MVC - a journey of discovery" - Lotte Pitcher"Umbraco MVC - a journey of discovery" - Lotte Pitcher
"Umbraco MVC - a journey of discovery" - Lotte Pitcherlottepitcher
 
DotNed Umbraco Presentation
DotNed Umbraco PresentationDotNed Umbraco Presentation
DotNed Umbraco PresentationRoel
 
Bilingualism And Multilingualism (ASBAR)
Bilingualism And Multilingualism (ASBAR)Bilingualism And Multilingualism (ASBAR)
Bilingualism And Multilingualism (ASBAR)Asbarcourse
 
Multilingualism and bilingualism
Multilingualism and bilingualismMultilingualism and bilingualism
Multilingualism and bilingualismFarooq Niazi
 
Language choice in multilingual communities
Language choice in multilingual communitiesLanguage choice in multilingual communities
Language choice in multilingual communitiesSalvador Ramírez
 
Sociolinguistics - Multilingualism
Sociolinguistics - MultilingualismSociolinguistics - Multilingualism
Sociolinguistics - MultilingualismFaizal Mansyur
 
what is mother-tongue based teaching?
what is mother-tongue based teaching?what is mother-tongue based teaching?
what is mother-tongue based teaching?leony espin
 
Scaling Security Operations and Automating Governance: Which AWS Services Sho...
Scaling Security Operations and Automating Governance: Which AWS Services Sho...Scaling Security Operations and Automating Governance: Which AWS Services Sho...
Scaling Security Operations and Automating Governance: Which AWS Services Sho...Amazon Web Services
 
Mother tongue based multilingual education
Mother tongue based multilingual educationMother tongue based multilingual education
Mother tongue based multilingual educationbeedivb
 
Bilingualism & Multilingualism
Bilingualism & MultilingualismBilingualism & Multilingualism
Bilingualism & MultilingualismDevi Hermasari
 
Bilingualism
BilingualismBilingualism
BilingualismM R
 
Natural Resources
Natural ResourcesNatural Resources
Natural Resourcesashishtqm
 
Natural Resources
Natural ResourcesNatural Resources
Natural Resourcesheathernjcu
 
Natural resources final ppt
Natural resources final pptNatural resources final ppt
Natural resources final pptAnoop K Mishra
 
Mother Tongue Based - Multilingual Education (MTB-MLE) in Philippines
Mother Tongue Based - Multilingual Education (MTB-MLE) in PhilippinesMother Tongue Based - Multilingual Education (MTB-MLE) in Philippines
Mother Tongue Based - Multilingual Education (MTB-MLE) in PhilippinesDåLé Rǝnomǝron
 

En vedette (20)

An Introduction to Umbraco
An Introduction to UmbracoAn Introduction to Umbraco
An Introduction to Umbraco
 
"Umbraco MVC - a journey of discovery" - Lotte Pitcher
"Umbraco MVC - a journey of discovery" - Lotte Pitcher"Umbraco MVC - a journey of discovery" - Lotte Pitcher
"Umbraco MVC - a journey of discovery" - Lotte Pitcher
 
DotNed Umbraco Presentation
DotNed Umbraco PresentationDotNed Umbraco Presentation
DotNed Umbraco Presentation
 
Bilingualism And Multilingualism (ASBAR)
Bilingualism And Multilingualism (ASBAR)Bilingualism And Multilingualism (ASBAR)
Bilingualism And Multilingualism (ASBAR)
 
Multilingualism and bilingualism
Multilingualism and bilingualismMultilingualism and bilingualism
Multilingualism and bilingualism
 
Multilingualism
MultilingualismMultilingualism
Multilingualism
 
Language choice in multilingual communities
Language choice in multilingual communitiesLanguage choice in multilingual communities
Language choice in multilingual communities
 
Sociolinguistics - Multilingualism
Sociolinguistics - MultilingualismSociolinguistics - Multilingualism
Sociolinguistics - Multilingualism
 
what is mother-tongue based teaching?
what is mother-tongue based teaching?what is mother-tongue based teaching?
what is mother-tongue based teaching?
 
Scaling Security Operations and Automating Governance: Which AWS Services Sho...
Scaling Security Operations and Automating Governance: Which AWS Services Sho...Scaling Security Operations and Automating Governance: Which AWS Services Sho...
Scaling Security Operations and Automating Governance: Which AWS Services Sho...
 
Multilingualism
MultilingualismMultilingualism
Multilingualism
 
Mother tongue based multilingual education
Mother tongue based multilingual educationMother tongue based multilingual education
Mother tongue based multilingual education
 
natural resources
natural resourcesnatural resources
natural resources
 
Bilingualism & Multilingualism
Bilingualism & MultilingualismBilingualism & Multilingualism
Bilingualism & Multilingualism
 
Multilingualism
MultilingualismMultilingualism
Multilingualism
 
Bilingualism
BilingualismBilingualism
Bilingualism
 
Natural Resources
Natural ResourcesNatural Resources
Natural Resources
 
Natural Resources
Natural ResourcesNatural Resources
Natural Resources
 
Natural resources final ppt
Natural resources final pptNatural resources final ppt
Natural resources final ppt
 
Mother Tongue Based - Multilingual Education (MTB-MLE) in Philippines
Mother Tongue Based - Multilingual Education (MTB-MLE) in PhilippinesMother Tongue Based - Multilingual Education (MTB-MLE) in Philippines
Mother Tongue Based - Multilingual Education (MTB-MLE) in Philippines
 

Similaire à Multi Lingual Websites In Umbraco

Web technology html5 php_mysql
Web technology html5 php_mysqlWeb technology html5 php_mysql
Web technology html5 php_mysqldurai arasan
 
Ruby on Rails (RoR) as a back-end processor for Apex
Ruby on Rails (RoR) as a back-end processor for Apex Ruby on Rails (RoR) as a back-end processor for Apex
Ruby on Rails (RoR) as a back-end processor for Apex Espen Brækken
 
Bay NET Aug 19 2009 presentation ppt
Bay  NET Aug 19 2009 presentation pptBay  NET Aug 19 2009 presentation ppt
Bay NET Aug 19 2009 presentation pptArt Scott
 
Webpack & EcmaScript 6 (Webelement #32)
Webpack & EcmaScript 6 (Webelement #32)Webpack & EcmaScript 6 (Webelement #32)
Webpack & EcmaScript 6 (Webelement #32)srigi
 
Ruby on Rails
Ruby on RailsRuby on Rails
Ruby on RailsDelphiCon
 
Mashups MAX 360|MAX 2008 Unconference
Mashups MAX 360|MAX 2008 UnconferenceMashups MAX 360|MAX 2008 Unconference
Mashups MAX 360|MAX 2008 UnconferenceElad Elrom
 
Ruby On Rails Tutorial
Ruby On Rails TutorialRuby On Rails Tutorial
Ruby On Rails Tutorialsunniboy
 
Software Internationalization Crash Course
Software Internationalization Crash CourseSoftware Internationalization Crash Course
Software Internationalization Crash CourseWill Iverson
 
Fukuoka Ruby Award 2023 - Opal
Fukuoka Ruby Award 2023 - OpalFukuoka Ruby Award 2023 - Opal
Fukuoka Ruby Award 2023 - OpalAndy Maleh
 
Unit - 1: ASP.NET Basic
Unit - 1:  ASP.NET BasicUnit - 1:  ASP.NET Basic
Unit - 1: ASP.NET BasicKALIDHASANR
 
Visual Studio .NET2010
Visual Studio .NET2010Visual Studio .NET2010
Visual Studio .NET2010Satish Verma
 
Phoenix for Rails Devs
Phoenix for Rails DevsPhoenix for Rails Devs
Phoenix for Rails DevsDiacode
 
Introductionto Xm Lmessaging
Introductionto Xm LmessagingIntroductionto Xm Lmessaging
Introductionto Xm LmessagingLiquidHub
 
all languages in computer programming
all languages in computer programmingall languages in computer programming
all languages in computer programminghamza239523
 
Language Server Protocol - Why the Hype?
Language Server Protocol - Why the Hype?Language Server Protocol - Why the Hype?
Language Server Protocol - Why the Hype?mikaelbarbero
 
Aspect-oriented programming in Perl
Aspect-oriented programming in PerlAspect-oriented programming in Perl
Aspect-oriented programming in Perlmegakott
 
Crystal internals (part 1)
Crystal internals (part 1)Crystal internals (part 1)
Crystal internals (part 1)Ary Borenszweig
 
Crystal internals (part 1)
Crystal internals (part 1)Crystal internals (part 1)
Crystal internals (part 1)Ary Borenszweig
 

Similaire à Multi Lingual Websites In Umbraco (20)

Web technology html5 php_mysql
Web technology html5 php_mysqlWeb technology html5 php_mysql
Web technology html5 php_mysql
 
Ruby on Rails (RoR) as a back-end processor for Apex
Ruby on Rails (RoR) as a back-end processor for Apex Ruby on Rails (RoR) as a back-end processor for Apex
Ruby on Rails (RoR) as a back-end processor for Apex
 
Bay NET Aug 19 2009 presentation ppt
Bay  NET Aug 19 2009 presentation pptBay  NET Aug 19 2009 presentation ppt
Bay NET Aug 19 2009 presentation ppt
 
Webpack & EcmaScript 6 (Webelement #32)
Webpack & EcmaScript 6 (Webelement #32)Webpack & EcmaScript 6 (Webelement #32)
Webpack & EcmaScript 6 (Webelement #32)
 
Ruby on Rails
Ruby on RailsRuby on Rails
Ruby on Rails
 
Mashups MAX 360|MAX 2008 Unconference
Mashups MAX 360|MAX 2008 UnconferenceMashups MAX 360|MAX 2008 Unconference
Mashups MAX 360|MAX 2008 Unconference
 
Ruby On Rails Tutorial
Ruby On Rails TutorialRuby On Rails Tutorial
Ruby On Rails Tutorial
 
Software Internationalization Crash Course
Software Internationalization Crash CourseSoftware Internationalization Crash Course
Software Internationalization Crash Course
 
Fukuoka Ruby Award 2023 - Opal
Fukuoka Ruby Award 2023 - OpalFukuoka Ruby Award 2023 - Opal
Fukuoka Ruby Award 2023 - Opal
 
Xml+messaging+with+soap
Xml+messaging+with+soapXml+messaging+with+soap
Xml+messaging+with+soap
 
Unit - 1: ASP.NET Basic
Unit - 1:  ASP.NET BasicUnit - 1:  ASP.NET Basic
Unit - 1: ASP.NET Basic
 
Visual Studio .NET2010
Visual Studio .NET2010Visual Studio .NET2010
Visual Studio .NET2010
 
Phoenix for Rails Devs
Phoenix for Rails DevsPhoenix for Rails Devs
Phoenix for Rails Devs
 
Introductionto Xm Lmessaging
Introductionto Xm LmessagingIntroductionto Xm Lmessaging
Introductionto Xm Lmessaging
 
all languages in computer programming
all languages in computer programmingall languages in computer programming
all languages in computer programming
 
Language Server Protocol - Why the Hype?
Language Server Protocol - Why the Hype?Language Server Protocol - Why the Hype?
Language Server Protocol - Why the Hype?
 
Aspect-oriented programming in Perl
Aspect-oriented programming in PerlAspect-oriented programming in Perl
Aspect-oriented programming in Perl
 
F# Tutorial @ QCon
F# Tutorial @ QConF# Tutorial @ QCon
F# Tutorial @ QCon
 
Crystal internals (part 1)
Crystal internals (part 1)Crystal internals (part 1)
Crystal internals (part 1)
 
Crystal internals (part 1)
Crystal internals (part 1)Crystal internals (part 1)
Crystal internals (part 1)
 

Multi Lingual Websites In Umbraco

  • 1. Multi-lingual Websites in Umbraco A Case Study of Savant.AECom.com Paul Marden Director
  • 2. Background This is a practical case study, not intended to be a demonstration of best practice. Project was to migrate an existing ASP / Flash site from a proprietary CMS to Umbraco. Aim was to provide a functionally equivalent front-end that required the minimum amount of rework of the Flash components.
  • 3.
  • 4. About the client Savant is an international construction company with 20 offices across 13 countries in Europe and Central Asia. Their site provides all primary content in English and Russian, with 11 regional office micro-sites in English and that country’s language. In all cases there is a 1-to-1 match between English / Russian nodes or English / 3rd Language nodes.
  • 5. Specs Built on 4.0.0 RC1 and currently deployed on 4.0.1 Running on Fasthosts dedicated server; Windows Server 2003 Web Edition SQL Server 2005 Express Edition ~320 nodes, 22 document types, 28 templates & 23 macros
  • 6. Flash integration The site uses Flash movies extensively to display content in an attractive way. Much is legacy code inherited from the existing version of the site/cms. We made use of sIFR v3 to render page headers and menu’s. Started with fonts generated by sIFR Generator but reverted to creating the sIFR font file in Flash – not all Cyrillic fonts are the same!
  • 7. Approaches to multilingual sites After some research there seemed to be two design patterns for multi-lingual sites: Multi-lingual 1:1 sites (as written about by Torleik) Separate branches for each language We ended up with a compromise between both!
  • 8. Separate host names Originally designed to separate out English and Russian pages with two root nodes. In the dev version these had separate host names and languages (best practice?). Also required configuration of IIS to route traffic to the appropriate Website! An advantage of this was that we could have Cyrillic URL’s giving better SEO.
  • 10.
  • 11.
  • 12.
  • 13. But... Existing Flash movies for News, Projects etc, needed EN & RS in the same XML feed, so we needed a way of retrieving EN & RS for News Item 1, News Item 2 etc. URLs with Cyrillic's broke the movies and rendered rather strangely when pasted into emails... http://rs.savant.capbuild.com/%D0%BE%D0%BF%D1%8B%D1%82-%D1%80%D0%B0%D0%B1%D0%BE%D1%82%D1%8B.aspx We kept the separate root nodes for EN and RS, but gave up on Cyrillic URLs and also didn’t implement separate host names. Instead naming pages e.g. Experience.aspx and ExperienceRS.aspx ! This was a bad design decision !
  • 14. Relating nodes Each page on the site has to relate together EN and RS content, so that it was possible to flick between different language versions of the page. We achieved this using a content picker field on each doc type. Within the template we call a macro to insert the link to the other page: <xsl:variable name=“link” select=“$currentPage/data[@alias='LinkedPage‘]”/> <xsl:if select=“$link != ‘’"> <a href="{umbraco.library:NiceUrl($link)}">English</a> </xsl:if>
  • 15.
  • 16.
  • 17. Listing pages The site consists of four “database” like document types. These hold job opportunities, projects completed, press releases and office locations. Each is output on a listing page. This page contains a paged static HTML version of the items, as well as a call to a Flash movie which retrieves the items as an XML file to display a prettier version. We began with separating out the list item nodes by language, but the users found this difficult to manage, so we reverted to a 1:1 multilingual pattern.
  • 18.
  • 19.
  • 20. Listing pages (templates & macros) Each listing has an HTML view and an XML view. In order to retain backwards compatibility with existing Flash movie we implemented two pages e.g. news.aspx and getNewsXML.aspx. Each had their own Document Type, Template and Macro for retrieving list items. Although were it to be a virgin site, I would have gone for one page, with two templates then used ?alttemplate=othertemplate
  • 21. Plan was deploy to Savant’s shared server architecture. But once deployed we found this was a medium trust environment. So the day before planned go live we bought a Fasthosts dedicated server. Implementation Pains
  • 22. Dictionary In the latest edition of the site we’ve implemented translation using the Umbraco dictionary. This makes use of the Languages defined for the site to display a neat interface (in U4) that display words to be translated. Functions are then available in umbraco.library to insert a translated value for a certain keyword. This reduces the number of macros in the site, simplifies them, and provides a better editors interface.
  • 23.
  • 24.
  • 25. Orcare Dictionary Access (part 1) <msxsl:script language="C#" implements-prefix="orcare">    <![CDATA[    public string GetDictionaryItemByContext(string key, intlanguageId)    {        return new umbraco.cms.businesslogic.Dictionary.DictionaryItem(key).Value(languageId);    }    ]]></msxsl:script> Error in XSLT at line 233, char 20231:       public string GetDictionaryItemByContext(string key, intlanguageId)232:       {233: >>>   return new umbraco.cms.businesslogic.Dictionary.DictionaryItem(key).Value(languageId); <<<234:       }
  • 27. Orcare Dictionary Access (part 2) So we built our own library which can be called from XSL files. Based on very old notes from Wikibooks. Create a new project Create a class (OrcareLib) Import all the necessary parts of the Umbraco API Create your methods
  • 28. Public Class OrcareLib Public Shared Function GetDictionaryItemByLanguageId(ByVal key As String, ByVallanguageId As Integer) As String Dim d As New Dictionary.DictionaryItem(key) GetDictionaryItemByLanguageId = d.Value(languageId) End Function Public Shared Function GetDictionaryItemByCultureCode(ByVal key As String, ByValcultureCode As String) As String Dim d As New Dictionary.DictionaryItem(key) Dim l As Language l = Language.GetByCultureCode(cultureCode) GetDictionaryItemByCultureCode = d.Value(l.id) End Function End Class Orcare Dictionary Access (part 2)
  • 29. Build the project, and copy the dll into the /bin folder in umbraco Register the library in /config/xsltExtensions.xml <ext assembly="/bin/OrcareLib" type="com.orcare.OrcareLib" alias="orcare.library" /> Add the library into the head of any XSL files xmlns:orcare.library ="urn:orcare.library" exclude-result-prefixes="msxmlumbraco.libraryorcare.library” Call the new methods <xsl:value-of select=“orcare.library:GetDictionaryItemByCultureCode (‘Aviation’,’ru-ru’)”/> Orcare Dictionary Access (part 2)
  • 30. Think more carefully about how you architect the site. 1:1 may be easier for your users, but breaks the dictionary. Separate hostnames for separate languages gives much better flexibility, but can be confusing for editors. But the editors still love the editing experience in Umbraco, even with the compromises we made. If you are planning to deploy to a new environment test it early to make sure it’s suitable. Parting shots

Notes de l'éditeur

  1. Personal introduction…Orcare is an IT Services company, we specialise in supporting growing businesses and charities. But the fact is that for most small businesses their website is their greatest IT investment. When developing websites we’ve used Umbraco exclusively for just over a year.…Orcare has been a full time job for me since July 2009, before then I was Project Manager Technology Introduction for British Airways where I specialised in the evaluation and introduction of enabling and cost reduction technologies, like Oracle Real Application Clusters, Red Hat Linux and SOA tools such as iLogJrules and Sonic ESB.
  2. Collaboration between Red Box Media and Orcare…This is a story of compromise with may offend the architectural sensibilities of many of you present. We compromised in some cases because we needed to maintain backwards compatibility. But more often than not we compromised because of my naivety.…When we started this was only my 3rdumbraco website, and the two that came before were simple 10 page brochure site.…If I had my time again there are a couple of significant changes I would have made to the way we built the site. But I’ll explain those as I go along.
  3. This is a snapshot of the Russian home page. The design is entirely the work of Red Box Media.
  4. When the project started they were an independent private company. But they have since been taken over by Aecom a US based Fortune 500 construction management company.…Fairly standard corporate brochure site.…For example there is a micro-site for Latvia that is in English and Latvian and Kazakhstan micro-site in English and Kazakh
  5. Not a huge site but it was my biggest to date
  6. In the 1:1 pattern your build document types in your site such that they contain a complete set of properties for each language. For example, if you have a TextPage document type with a Title and BodyText property, you would need a TitleLang1 and TitleLang2 and BodyTextLang1 and BodyTextLang2. This structure is fairly rigid (implied in the name) because it requires all content to be in all languages, which isn’t the case in many sites, and if you have multiple languages you need to replicate fields for all languages. This pattern also breaks certain Umbraco freebies such as the dictionary (more on this later). But it’s fairly easy to setup and get your head around, and in some cases editors will prefer the ease of navigation (again more on this later).The alternative approach is to create multiple branches in the site, one for each language. Translated copy can then be related together so that you can link nodes in your macros. This has the advantage of flexibility – you don’t have to use the same site structure or content in different languages, and a google search of the forum places a lot of weight behind this approach. It’s a little trickier to setup but not rocket science. But crucially we found that it can also make managing the site harder for editors.