Locale in Thunkable ✕

Does anyone know how to get the user’s locale or at least the country in Thunkable ✕? I look for an easy way to replicate the functions of my Localization extension.

-Red Panda

In the project below, add your KEY API to the text block with &key=. Look at the full JSON response There you can find a lot of information.


This is the maximum that you can find out. locale can not be recognized.

1 Like

I solved it by myself using http://ip-api.com that returns the user’s country based on their IP and a public json file containing all the information.
EDIT: @actech informed me that the service I was using will shut down. I updated my original post

1 Like

Have you seen the information about this service?

"This API endpoint is deprecated and will stop working on July 1st, 2018. For more information please visit: https://github.com/apilayer/freegeoip#readme"

Damn, the second service shutting down their service soon :cry:

I created an example project at https://x.thunkable.com/projects/5b22235a9a56e0ba8062fdb3/project/properties/designer/ (link has been updated)

1 Like

I’m trying to run your project and get a white screen when I run the Web.Get block.

A white screen occurs when the “object < get object from json < responce”. Responce block is not JSON data. This block contains the source code of the page.

The rest of the application works and determines the country.

The projects work for me. Which response block do you mean? The one in caption or the one in fullResponse? Can you access the example file with your browser? Here is the project link, so you’ll always have the latest version

Thanks, I for myself found the useful information from your block and together with these found an error. When using the “get object from JSON” block, it should always check whether the block on the right is JSON-data or not. Otherwise, when this block is executed, a white screen appears.


1 Like