stefalda / ReactNativeLocalization

Class to localize the ReactNative interface
MIT License
898 stars 123 forks source link

Get the list of existing languages #184

Closed programmaker closed 4 years ago

programmaker commented 4 years ago

Hi. I do have the dictionary with several languages and from time to time I'm adding more languages/translations. How can I get list of existing translations dynamically? (e.g. in react-native-localize we can do RNLocalize.getLocales()) Thanks.

stefalda commented 4 years ago

Hi, you can call this method:

strings.getAvailableLanguages()

it returns an array of the passed languages.