In Hubl language how to get country code or country name?

SOLVE
prasadcolumbus
Regular Contributor | Gold Partner

In custom module  we have to chnage the currency based on country codes. Can any one help on this  how to do it on hubl language? 

Reply
0 Upvotes
1 Accepted solution

Accepted Solutions
mansigovani
Solution
Regular Contributor

@prasadcolumbus , thank you for your response. I was stuck too. But then I found a variable {{ request.geoip_country }} and it worked for me. Below is the 'if condition' I used.
{% if request.geoip_country == "us" %} where "us" is country code for "United States".

Hope it works for you. 🙂

View solution in original post

7 Replies 7
DanielSanchez
Regular Advisor

Hi @prasadcolumbus ,

 

U already use multilanguage pages to create variation in HubSpot?

 

If dont use, is simple. Look:

 

1) Open webpages list in your HubSpot;

2) Click in "More" on page you want create the variation;

3) Click em "Create multi-language variation".

create-variation-language.PNG

4) Select the language of new variation:

select-language.PNG

 

Now, u can insert others texts, images and values for the variation created.

 

Please, if this content is what you are looking for, mark it as a solution.

Best regards!

 

 

prasadcolumbus
Regular Contributor | Gold Partner

Hi DanielSanchez,

 

Thanks for your replay, But it's not solution for my issue.

 

In HUBL language how to get country code or country name? like {{ request.remote_ip }}

https://designers.hubspot.com/docs/hubl/hubl-supported-variables

 

Reply
0 Upvotes
mansigovani
Regular Contributor

@prasadcolumbus , did you find any solution for this?

Reply
0 Upvotes
prasadcolumbus
Regular Contributor | Gold Partner

No. I did n't get any solution for above issue.

Reply
0 Upvotes
mansigovani
Solution
Regular Contributor

@prasadcolumbus , thank you for your response. I was stuck too. But then I found a variable {{ request.geoip_country }} and it worked for me. Below is the 'if condition' I used.
{% if request.geoip_country == "us" %} where "us" is country code for "United States".

Hope it works for you. 🙂

View solution in original post

prasadcolumbus
Regular Contributor | Gold Partner

 @mansigovani it's working for me also.Thank you so much on your support and time.

mansigovani
Regular Contributor

@prasadcolumbus , I am glad, I was of some help to you! 

Reply
0 Upvotes