Nov 2, 2022 2:35 AM
How to get country code or name the right way.
we were successfully fetching the country using this
{{request.headers["cf-ipcountry"]|lower}}
but it's not working anymore in product i.e, after the page is published.
is there any right way to fetch the country which will not break in future?
Solved! Go to Solution.
Nov 2, 2022 3:45 AM
Hi RShaik3!
Personnaly I use:
{{ request.geoip_country|lower }}
or
{{ html_lang }}
I hope it helps 😊
Matthieu
matthieu.berard@markentive.com
Nov 2, 2022 3:45 AM
Hi RShaik3!
Personnaly I use:
{{ request.geoip_country|lower }}
or
{{ html_lang }}
I hope it helps 😊
Matthieu
matthieu.berard@markentive.com