CMS Development

prasadcolumbus
Participant | Diamond Partner
Participant | Diamond Partner

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

SOLVE

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? 

0 Upvotes
1 Accepted solution
mansigovani
Solution
Contributor

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

SOLVE

@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
Key Advisor | Platinum Partner
Key Advisor | Platinum Partner

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

SOLVE

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
Participant | Diamond Partner
Participant | Diamond Partner

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

SOLVE

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

 

0 Upvotes
mansigovani
Contributor

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

SOLVE

@prasadcolumbus , did you find any solution for this?

0 Upvotes
prasadcolumbus
Participant | Diamond Partner
Participant | Diamond Partner

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

SOLVE

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

0 Upvotes
mansigovani
Solution
Contributor

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

SOLVE

@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. 🙂

prasadcolumbus
Participant | Diamond Partner
Participant | Diamond Partner

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

SOLVE

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

mansigovani
Contributor

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

SOLVE

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

0 Upvotes