12
Multilingual support in Kentico CMS Martin Hejtmanek CTO Kentico Software s.r.o. [email protected] http://devnet.kentico.com/Blogs/Martin-Hejtmanek.aspx

Multilingual support in Kentico CMS

  • Upload
    rio

  • View
    73

  • Download
    3

Embed Size (px)

DESCRIPTION

Multilingual support in Kentico CMS. Martin Hejtmanek CTO Kentico Software s.r.o . [email protected] http://devnet.kentico.com/Blogs/Martin-Hejtmanek.aspx. Agenda. How to configure multilingual site Default culture and combine options Managing multilingual content - PowerPoint PPT Presentation

Citation preview

Page 1: Multilingual support in  Kentico  CMS

Multilingual support in Kentico CMS

Martin HejtmanekCTO

Kentico Software s.r.o.

[email protected]

http://devnet.kentico.com/Blogs/Martin-Hejtmanek.aspx

Page 2: Multilingual support in  Kentico  CMS

Agenda1) How to configure multilingual site 2) Default culture and combine options3) Managing multilingual content 4) Displaying multilingual content 5) Multilingual URLs and aliases 6) How the content is stored in the

database7) Resource strings and localization

Page 3: Multilingual support in  Kentico  CMS

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

Page 4: Multilingual support in  Kentico  CMS

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

HOME (CZ) Products (CZ) Disclaimer (EN)

HOME (CZ) Products (CZ)

CZ, combine

CZ, not combine

=

=

Page 5: Multilingual support in  Kentico  CMS

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

Page 6: Multilingual support in  Kentico  CMS

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

Page 7: Multilingual support in  Kentico  CMS

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

Page 8: Multilingual support in  Kentico  CMS

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)

CMS_Tree CMS_Document CONTENT_NewsCOM_SKU

CMS_Document CONTENT_News

All language versions

One language

TreeNode

Page 9: Multilingual support in  Kentico  CMS

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

Page 10: Multilingual support in  Kentico  CMS

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

Page 11: Multilingual support in  Kentico  CMS

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

Page 12: Multilingual support in  Kentico  CMS

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