Closed zedtux closed 3 years ago
A better option would be to allow passing an array of string or an array of Object as countries
and remove the customLabels
:
<ReactFlagsSelect
countries={[
{ BE: 'FR' },
{ BE: 'NL' },
{ FR: 'FR' }
]}
/>
It would cover the README.md
example too:
<ReactFlagsSelect
countries={[
{ US: 'EN-US' },
{ GB: 'EN-GB },
{ FR: 'FR' },
{ DE: 'DE' },
{ IT: 'IT' }
]}
/>
I'm looking for exactly the same thing. Another use case: some languages can be written in multiple alphabets, for example Serbian language can be written with both latin and cyrillic alphabets, thus this would be useful.
Hope this can be merged soon.
Great to see that my work would help someone else ! 🤩
@ekwonye-richard can you please have a look at the PR and give your input?
Closing this following the closed PR
I'm trying to so a language selector using this component but the issue is that for the same country, there are different languages, but only the last one is kept from the
customLabels
object.Here is how I'm trying to use
customLabels
:Would you mind to implement this use case please?
Adding another
BE
in thecountries
list helped a little bit: