-
Notifications
You must be signed in to change notification settings - Fork 10
Localization
Localization can be done in two ways:
- Through .resx resource files
- Through Kentico Xperience
Localization
->Resource Strings
Currently, Kentico Xperience only supports Resource Strings for internal localization (forms, widget dialogues, etc), but provided no support for .Net Core's IHtmlLocalizer
, IStringLocalizer
, or IViewLocalizer
.
We created a package XperienceCommunity.Localizer which adds fallback support for the baked in localizers, that if they cannot localize a string, it will look to the Resource Strings
in Kentico Xperience to resolve.
Data Annotation Attributes are also already set to use Resource Strings
as a fall back.
The Baseline already has this enabled. It also has SharedResources.resx configured for shared resource localization, and an example of HomeViewComponent.resx (used here) as an example of a feature specific resource file.
Translations will operate as follows:
- Matching key in a _____.lang-Region.resx (ex: SharedResources.es-MX.resx)
- Matching key in a _____.lang.resx (ex: SharedResources.es.resx)
- Matching key in a _____.resx (ex: SharedResources.resx)
- Matching
Resource String
for the specific lang-Region - Matching
Resource String
for the site's default language - Parse with
ResHelper.LocalizeString(key)
which will handle strings with localization keys nested (ex: "Hello {$ generic.world $}")
Resource Strings
are cached per requested culture on a whole, so for each culture it will make 1 database call getting all the keys + values (defaulting to the default site culture if not defined).
- Solution architecture
- Feature Folders
- Page Template View Component
- Interface Model Implementation Map
- Cache Dependency Building and Async
- Post Redirect Get
- Front End Asset (CSS/JS Parsing
- Navigation
- Page Builder Header/Footer
- SEO Meta Data
- Navigation Redirection
- Page Types
- Partial Widget Page / ShareableContent
- Widgets
- Account Management
- External Authentication/Two Factor Authentication
- Ecommerce Ready
- Error Pages
- Sitemap
- Robots.txt
- Form Bootstrapification
- Bundling css/javascript + Gzip
- Bootstrap and Containers