i18n/ I18n Decorator
Exports the i18n/I18nDecorator.I18nDecorator component and i18n/I18nDecorator.contextTypes validation rules.
import I18nDecorator from '@enact/i18n/I18nDecorator';
Members
I18nDecoratorHigher-Order Component
i18n/I18nDecorator.I18nDecorator is a Higher Order Component that is used to wrap
the root element in an app. It provides an rtl
member on the context of the wrapped component, allowing
the children to check the current text directionality as well as an updateLocale
method that can be
used to update the current locale.
There are no configurable options on this HOC.
import I18nDecorator from '@enact/i18n/I18nDecorator';
contextTypes
contextTypes
is an object that exports the default context validation rules. These must be applied
to any child components that wish to receive the i18n context.
import {contextTypes} from '@enact/i18n/I18nDecorator';
...
myComponent.contextTypes = contextTypes;
ArrayBooleanFunctionModuleNumberObjectString