@exodus/locale
Module for tracking users locale data such as language and currency
Install
npm i @exodus/localeUsage
This feature is designed to be used together with @exodus/headless. See using the sdk.
API Side
See using the sdk for more details on how features plug into the SDK and the API interface in the type declaration .
await exodus.locale.setLanguage('nl');
await exodus.locale.setCurrency('EUR');UI Side
See using the sdk for more details on basic UI-side setup.
import { selectors } from '~/ui/flux';
const LocaleDisplay = () => {
const language = useSelector(selectors.locale.language);
const currrency = useSelector(selectors.locale.currency);
return (
<Text>
Language: {language}
Currency: {currency}
</Text>
);
};