Culture/ Language Support on Bootstrap

Modified on Fri, Feb 9, 2018 at 9:51 AM

The {Culture} keyword can be used in a Master page Template (Bootstrap). It is used to switch culture by displaying flags of countries. This keyword displays a fixed number of countries.


Other format

{Culture:culture;culture^size} displays the defined flags only.

{Culture:en-gb;fr-fr} show uk and france flags by default size (2 == 24px)

{Culture:en-gb;fr-fr^1}  Show flags in size 1 == 16px  default

{Culture:all^2}  Show flags in size 2 == 24px

{Culture:all^3}  Show flags in size 3 == 32px

{Culture:all^4}  Show flags in size 4 == 48px

{Culture:all^5}  Show flags in size 5 or more == 64px

Note: Separator ‘:’ can be used instead of ‘^’. ‘^’ is enforced inside {Menu:..}

{Culture:culture,html tags (all goes inside an anchor tag); culture, html tags;...} The hyperlink image or text has to be added manually.

{Culture: en-ca,<img src=’Storage/1/1/0/Assets/flags/Canada.png’ />; en-us,<img src=’Storage/1/1/0/Assets/flags/usa.png’ />}


Fully Customized Menu

<ul>

 <li><a href=”{CurrentUrl}&CUL=en-gb”>English</a>

 <li><a href=”{CurrentUrl}&CUL=fr-fr”>French</a>

</ul>

{CurrentUrl} is substituted by Absolute Uri of the current page.  If you have other query string then make sure that &CUL= is the last.

Valid Examples:

{Culture}

{Culture:fr-fr,French;en-gb,English}

{Culture:fr-fr,<img src="/resources/Images/Flags/fr.png" />;en-gb, <img src="/resources/Images/Flags/gb.png" />}

In the above, the image will automatically be surrounded by the correct anchor link.


Examples



Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article