Open cbarceloc opened 2 years ago
Any update on this one? Basically the initial list is presented with the correct translation, but as soon as you start typing in the search filter, the filtered results are shown in default english
Ciao @cbarceloc , @Poli97 , and everyone,
I ran into the same problem as you and tried to solve it,
The problem in my opinion:
The problem could be data: search(filter, data)
from /lib/CountryList.js
, more precisely the problem could be search
from useContext()
.
When trying to do a search, search(filter, data)
returns data with the old translation
option. If you debug filter
and data
in /lib/CountryList.js,
the variables are set correctly, but when you activate the search
function, an old data
is passed back.
The solution I created a repo that with a js script solves the problem before building the app https://github.com/9christian9/FIX-react-native-country-picker-modal-filtering-countries-with-old-translation
I hope this will help. With ♥ by Christian
The countries list show correct translations, but when we write some text in the search box, the list shown is always in english