Skip to content

useLocalization

Stanisław Małolepszy edited this page Jul 6, 2020 · 2 revisions

The useLocalization hook can be used to get a reference to the current ReactLocalization instance, for example in order to format a translation with the imperative getString API.

let {l10n} = useLocalization();
alert(l10n.getString("hello"));