Multilingual: Akumina Framework language awareness - akumina/AkuminaTraining GitHub Wiki

Applies to

Akumina Foundation 3.4 and above

Overview

The Akumina framework has an awareness of whether Multilingual is enabled. It is able to recognize what language the site is in and whether the site has additional languages available, and allows the user to select the language for the site, which tailors the experience to the site.

Required List Columns

This is ONLY if the list is enabled for multilingual and not on the Language Neutral List.

To make content apps multilingual enabled within interchange, the list that those content apps are connected to need to have certain data columns available in them. Specifically, there are 3 columns that are used to update a list to be multilingual aware.

This is important information because if you need to make any manual updates to any lists that you have created for multilingual, this is the process that can be used.

There are 3 columns in the list (using the important dates_AK list as an example) required for multi lingual.

FieldName Type Properties Description
AkId Number Default: 1 This is the column that links the items together from a multilingual standpoint. All language versions will have the same AkId.
AkLanguageCode Single line of text Max: Default value The ll-cc code for the language of the item, example en-us or fr-fr.
AkLanguageId Number Default: 1 The language id code for the language of the item, example 1033 for English (US) or 1034 for Spanish (ES)

Language Neutral List

Language Neutral List

By default, when multilingual is on, the framework assumes all Lists and Libraries to be multilingual. If a list is not multilingual, then it is possible to override the setting by adding the list name to the Language Neutral List property in the site creator.

UserContext Properties

The UserContext object has several properties related to multilingual, to assist a developer in determining the language of the user.

Property Description
FallbackLanguageId The id code for the fallback language of the user.
LanguageCode The ll-cc code for the language of the user
LanguageId The id code for the language of the user

These properties can be accessed via the following calls:

Akumina.Digispace.UserContext.FallbackLanguageId
"1033"

Akumina.Digispace.UserContext.LanguageCode
"es-es"

Akumina.Digispace.UserContext.LanguageId
1034

ConfigurationContext Properties

The ConfigurationContext has several properties related to multilingual, to assist a developer in determining the site language(s).

Property Description
AreMultipleLanguagesVisible Whether multiple languages are visible on the site (ie more than one is site visible).
DefaultLanguage The default language of the current site.
IsMultiLingualEnabled Whether multilingual is enabled on the site.
SiteVisibleLanguages An array of the languages that are marked as site visible.

These properties can be accessed via the following calls:

Akumina.Digispace.ConfigurationContext.AreMultipleLanguagesVisible
true

Akumina.Digispace.ConfigurationContext.DefaultLanguage
Object {languageId: 1033, languageCode: "en-us", direction: null, fallbackLanguageId: null}

Akumina.Digispace.ConfigurationContext.IsMultiLingualEnabled
true

Akumina.Digispace.ConfigurationContext.SiteVisibleLanguages
[Object, Object, Object]

Generic List Widget

Using the generic list widget is the same as in non multilingual; the control knows whether or not it should be in language aware mode.

See the Language Neutral List section for how to exclude a list from being considered multilingual.

Custom Widget

When building a custom widget, there are APIs that are available that can be used to fetch data from SharePoint in a language aware manner.

We have 2 methods for this