CMS Development

RShaik3
メンバー

How to get the country code or country name

解決

How to get country code or name the right way.
we were successfully fetching the country using this
{{request.headers["cf-ipcountry"]|lower}} 

Solved: HubSpot Community - In Hubl language how to get country code or country name? - HubSpot Comm...

 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?

0 いいね!
1件の承認済みベストアンサー
MBERARD
解決策
トップ投稿者 | Elite Partner
トップ投稿者 | Elite Partner

How to get the country code or country name

解決

Hi RShaik3!

Personnaly I use:

{{ request.geoip_country|lower }}

or 

{{ html_lang }}

 

I hope it helps 😊

 

Matthieu

matthieu.berard@markentive.com

元の投稿で解決策を見る

1件の返信
MBERARD
解決策
トップ投稿者 | Elite Partner
トップ投稿者 | Elite Partner

How to get the country code or country name

解決

Hi RShaik3!

Personnaly I use:

{{ request.geoip_country|lower }}

or 

{{ html_lang }}

 

I hope it helps 😊

 

Matthieu

matthieu.berard@markentive.com