Language Enactor API

Language Enactor Overview

Used to set the page's language. Currently this action is performed by saving the selected language to the settings store and reloading the page.

On This Page
Still need help?

Join the infusion-users mailing list and ask your questions there.


Adding a Language Enactor

The Language Enactor should be bound to an instance of a Preferences Editor by supplying it in an Auxiliary Schema.

 

Adding to an Auxiliary Schema:

fluid.defaults("my.auxSchema", {
	auxiliarySchema: {
		"lang": {
            "type": "gpii.firstDiscovery.language",
            "enactor": {
                "type": "gpii.firstDiscovery.enactor.lang"
            }
        }
	}
});

Grades

The base grades used by the the Language Enactor:

Model

Path

Description

Values

Default

lang

The selected language

A valid language code e.g.:

"en-US", "fr-FR", "es-MX", "de-DE", "nl-NL", "sv-SE"

"en-US"

Methods

Method

Description

Parameters

reloadPage

Triggers a page reload.

 

Members

Member

Description

Values

Default

initialLangSet

The state whether or not the initial language was set. This is to prevent a page reload on initialization

 Boolean

false

Dependencies

<script type="text/javascript" src="src/lib/infusion/infusion-custom.js"></script>
<script type="text/javascript" src="src/js/enactors.js"></script>