#How to get current culture?

1 messages · Page 1 of 1 (latest)

prime flame
#

Our site currently has two languages with some parts of the site displaying prices in localized currencies.

How to detect if site is domain.com or domain.com/da?

And get the current culture of the site?

prime flame
#

@inject UmbracoHelper umbracoHelper

Seems to do the trick. And umbracoHelper.CultureDictionary.Culture.TwoLetterISOLanguageName

sharp mountain
#

Umbracohelper.assignedcontent.culturefrpmdomains is an option (on phone, so syntax is probably off). This will not work if the view is loaded through ajax or something.

If the view inherits umbracoviewpage, you can use Umbraco.... As the Umbraco helper

rich ether
#

You can use the Threads current UI culture.