Hello. I want to use your api in a project. But in order to avoid getting a country/language mismatch error - just to be safe - I want to get only the language or only the country information from the user. but this time the same error comes again. Can we send only 1 parameter (country or language) to solve this problem? Do you have a chance to make a change in your API in this way? I would be very glad if you could help me, thank you.
Join in the discussion - add comment below:
Done! Let me know how it works.
Feel free to reach out if you have any questions or if anything is needed.
yes, you got it right. that is exactly what I need. i would be very glad if you could help me, thank you.
Hi,
I think we are on the same page, if I understand you correctly. I can set a default language by the supplied country when language is not supplied - would that work for your use case?
For example, if you send country=FR and no language, the API will default to language=fr.
Thank you,
Adam
I think it is much safer to get country information from the user. If we ask the language, as you said, confusion may occur. Also, I can show the user an alert about the country/language mismatch in advance. but since they have different country/language codes, I thought this would not be safe. If there is a library (php) that your API uses, it is also possible to solve the problem this way.
Hi there,
Thanks for your message. We can definitely look into it, yes. Question: can you always get the country or will you have cases in which you only have the language supplied by the user? I am asking because itโs harder to guess the country by the language conceptually (English, Arabic, Spanish, etc).
Thank you,
Adam