summaryrefslogtreecommitdiff
path: root/app_expo/i18n/translate.ts
blob: 64818746b8c0548d736a728033838be070570e60 (about) (plain)
1
2
3
4
5
6
7
8
9
10
11
import i18n from 'i18n-js'
import { TxKeyPath } from './i18n'

/**
 * Translates text.
 *
 * @param key The i18n key.
 */
export function translate(key: TxKeyPath, options?: i18n.TranslateOptions) {
  return key ? i18n.t(key, options) : null
}