MCPcopy Create free account
hub / github.com/reactnativecn/react-native-update / setLocale

Method setLocale

src/i18n.ts:18–20  ·  view source on GitHub ↗

* Set locale directly * @param locale - 'zh' or 'en'

(locale: 'zh' | 'en')

Source from the content-addressed store, hash-verified

16 * @param locale - 'zh' or 'en'
17 */
18 setLocale(locale: 'zh' | 'en') {
19 this.currentLocale = locale;
20 }
21
22 /**
23 * Get current locale

Callers 2

constructorMethod · 0.80
i18n.test.tsFile · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected