Get lookup of languages from language tags in React Native

177 Views Asked by At

I get a list of languagetags and need to convert them to display languages for all possible variations. For example:

input List: [en, it]
output List: [english, italian]

explanation: 
tag: 'en' corresponds to display: 'english'
tag: 'it' corresponds to display: 'italian'

Explored react-native-localize and react-native-localization but not able to achieve what I am looking for without manually maintaining the lookup of tag to language. Any recommendations

1

There are 1 best solutions below

0
On

Found this package that should address this: https://www.npmjs.com/package/iso-639-1