2.5.0 • Published 9 months ago

@exodus/locale v2.5.0

Weekly downloads
-
License
MIT
Repository
github
Last release
9 months ago

@exodus/locale

Module for tracking users locale data such as language and currency

Install

yarn add @exodus/locale

Usage

This feature is designed to be used together with @exodus/headless. See using the sdk.

Play with it

  1. Open the playground https://exodus-hydra.pages.dev/features/locale
  2. Try out some methods via the UI. These correspond 1:1 with the exodus.locale API.
  3. Run await exodus.locale.setCurrency('GBP') in the Dev Tools Console.

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>
  )
}
2.5.0

9 months ago

2.4.0

10 months ago

2.3.0

1 year ago

2.2.2

2 years ago

2.2.1

2 years ago

2.2.0

2 years ago

2.1.0

2 years ago

2.0.2

2 years ago

2.0.1

2 years ago

2.0.0

2 years ago

1.2.1

2 years ago

1.2.0

2 years ago

1.1.1

2 years ago

1.1.0

3 years ago