1 / 12

Multilingual support in Kentico CMS

Learn how to configure multilingual support in Kentico CMS, manage multilingual content, display it, handle multilingual URLs and aliases, and store content in the database. Includes resource strings and localization tips.

patrickd
Download Presentation

Multilingual support in Kentico CMS

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Multilingual support in Kentico CMS Martin Hejtmanek CTO Kentico Software s.r.o.martinh@kentico.comhttp://devnet.kentico.com/Blogs/Martin-Hejtmanek.aspx

  2. Agenda • How to configure multilingual site • Default culture and combine options • Managing multilingual content • Displaying multilingual content • Multilingual URLs and aliases • How the content is stored in the database • Resource strings and localization

  3. How to configure multilingual • Every web site is multilingual by default • It only has a single language allowed • Just allow additional cultures • Choose the default language • In site properties • And translate the content in CMSDesk

  4. Default culture / Combine • Default culture = main web site language • Combine with default culture (Settings) • When enabled, all non-translated documents are available from default culture = partially translated web site with complete content • When disabled, only translated documents are available = no cross-language content CZ, combine HOME (CZ) Products (CZ) Disclaimer (EN) = CZ, not combine HOME (CZ) Products (CZ) =

  5. Managing the content • With multiple cultures, CMSDesk provides culture selector (switches the language context) • Content tree always displays all documents • Even non-translated ones, priority: Current culture -> Default culture -> Any other culture • Editor switches between languages • Gets reported when the translation is missing • Can copy content from another language Not translated

  6. Displaying the content • By default, all web controls use current culture • You can configure the culture in control properties • Priorities of languages • Specific culture • Default culture (only with combine) • Any other first found culture (only for all option, nondeterministic) • ##ALL## or TreeProvider.ALL_CULTURES = All languages • ALL + Combine = Specific -> Default -> Any • 1 language per document • ALL + Not combine = All cultures of all documents • All languages per document

  7. Multilingual URLs and aliases • Node alias path (default document alias) • Same for all cultures, culture presented is based on the cookie value • Document URL path (main document URL if defined) • Specific per culture, specific URL targets specific culture • Document aliases • Alias for all cultures, culture is presented based on the cookie value • Alias for specific culture, specific alias targets specific culture • Priority of URLs • URL path • Node alias path • Aliases

  8. How the content is stored • Document joined from several tables (TreeNode class) • CMS_Tree – Location in the tree and basic culture-invariant properties • CMS_Document – Culture specific properties • Coupled table – Custom fields from table defined on document type creation • COM_SKU – If a product is available for the document from E-commerce (same product for all culture versions of the document) COM_SKU CMS_Tree CMS_Document CONTENT_News One language TreeNode CMS_Document CONTENT_News All language versions

  9. Resource strings / localization • Administration UI • Always based Preferred UI culture of the user • Live site UI • Always based on current visitor culture (matching the culture of the content) • For RTL languages, the RTL class is added to the <body> tag • Resource strings • In SQL DB – Manage from admin UI • In ~/CMSResources/*[.<culturecode>].resx • http://www.kentico.com/Download/Localization-Packs.aspx • When the resource string in particular culture is not found, default language is displayed

  10. Using localization • API – ResHelper.GetString(keyName) • Localization macros - {$keyName$} • In-place localization macros – {$=Hello|cs-cz=Ahoj$} • Localized transformations • Either use localization API or define localized transformation • cms.news.default • cms.news.default_cs-cz – Specific transformation for Czech

  11. Questions & Answers • Now is the time for your Q&A

  12. http://www.kentico.com http://devnet.kentico.com

More Related