• Share
    • Twitter
    • LinkedIn
    • Facebook
    • Email
  • Feedback
  • Improve this Doc

Class LocaleController

LocaleController provides method to manage all pages with localization content.

Inheritance
System.Object
ComponentBase<ILocaleController, LocaleController>
LocaleController
Implements
ILocaleController
Inherited Members
ComponentBase<ILocaleController, LocaleController>.Instance
ComponentBase<ILocaleController, LocaleController>.RegisterInstance(ILocaleController)
Namespace: DotNetNuke.Services.Localization
Assembly: DotNetNuke.dll
Syntax
public class LocaleController : ComponentBase<ILocaleController, LocaleController>, ILocaleController
Remarks

Content localization in DotNetNuke will allow you to easily manage your web pages in a primary language and then utilize translators to keep the content synchronized in multiple secondary languages. Whether you are maintaining your site in a single language or dozens of languages, the content localization system will help guide your content editors and translators through the process. Although content localization required extensive changes to the core platform, we have been able to add this new feature while still improving overall system performance.

Methods

| Improve this Doc View Source

ActivateLanguage(Int32, String, Boolean)

Activates the language without publishing it.

Declaration
public void ActivateLanguage(int portalid, string cultureCode, bool publish)
Parameters
Type Name Description
System.Int32 portalid

The portal ID.

System.String cultureCode

The culture code.

System.Boolean publish

if set to true will publish the language, otherwise will "un-publish".

Remarks

Content localization in DotNetNuke will allow you to easily manage your web pages in a primary language and then utilize translators to keep the content synchronized in multiple secondary languages. Whether you are maintaining your site in a single language or dozens of languages, the content localization system will help guide your content editors and translators through the process. Although content localization required extensive changes to the core platform, we have been able to add this new feature while still improving overall system performance.

| Improve this Doc View Source

CanDeleteLanguage(Int32)

Determines whether the language can be deleted.

Declaration
public bool CanDeleteLanguage(int languageId)
Parameters
Type Name Description
System.Int32 languageId

The language ID.

Returns
Type Description
System.Boolean

true if the language can be delete; otherwise, false.

Remarks

Content localization in DotNetNuke will allow you to easily manage your web pages in a primary language and then utilize translators to keep the content synchronized in multiple secondary languages. Whether you are maintaining your site in a single language or dozens of languages, the content localization system will help guide your content editors and translators through the process. Although content localization required extensive changes to the core platform, we have been able to add this new feature while still improving overall system performance.

| Improve this Doc View Source

GetCultures(Dictionary<String, Locale>)

Gets the cultures from local list.

Declaration
public List<CultureInfo> GetCultures(Dictionary<string, Locale> locales)
Parameters
Type Name Description
Dictionary<System.String, Locale> locales

The locales.

Returns
Type Description
List<CultureInfo>

culture list.

Remarks

Content localization in DotNetNuke will allow you to easily manage your web pages in a primary language and then utilize translators to keep the content synchronized in multiple secondary languages. Whether you are maintaining your site in a single language or dozens of languages, the content localization system will help guide your content editors and translators through the process. Although content localization required extensive changes to the core platform, we have been able to add this new feature while still improving overall system performance.

| Improve this Doc View Source

GetCurrentLocale(Int32)

Gets the current locale for current request to the portal.

Declaration
public Locale GetCurrentLocale(int portalId)
Parameters
Type Name Description
System.Int32 portalId

The portal id.

Returns
Type Description
Locale

A Locale instance.

Remarks

Content localization in DotNetNuke will allow you to easily manage your web pages in a primary language and then utilize translators to keep the content synchronized in multiple secondary languages. Whether you are maintaining your site in a single language or dozens of languages, the content localization system will help guide your content editors and translators through the process. Although content localization required extensive changes to the core platform, we have been able to add this new feature while still improving overall system performance.

| Improve this Doc View Source

GetDefaultLocale(Int32)

Gets the default locale of the portal.

Declaration
public Locale GetDefaultLocale(int portalId)
Parameters
Type Name Description
System.Int32 portalId

The portal id.

Returns
Type Description
Locale

A Locale instance.

Remarks

Content localization in DotNetNuke will allow you to easily manage your web pages in a primary language and then utilize translators to keep the content synchronized in multiple secondary languages. Whether you are maintaining your site in a single language or dozens of languages, the content localization system will help guide your content editors and translators through the process. Although content localization required extensive changes to the core platform, we have been able to add this new feature while still improving overall system performance.

| Improve this Doc View Source

GetLocale(Int32, String)

Gets the locale included in the portal.

Declaration
public Locale GetLocale(int portalID, string code)
Parameters
Type Name Description
System.Int32 portalID

The portal ID.

System.String code

The code.

Returns
Type Description
Locale

A Locale instance or null.

Remarks

Content localization in DotNetNuke will allow you to easily manage your web pages in a primary language and then utilize translators to keep the content synchronized in multiple secondary languages. Whether you are maintaining your site in a single language or dozens of languages, the content localization system will help guide your content editors and translators through the process. Although content localization required extensive changes to the core platform, we have been able to add this new feature while still improving overall system performance.

| Improve this Doc View Source

GetLocale(Int32)

Gets the locale.

Declaration
public Locale GetLocale(int languageID)
Parameters
Type Name Description
System.Int32 languageID

The language ID.

Returns
Type Description
Locale

A Locale instance or null.

Remarks

Content localization in DotNetNuke will allow you to easily manage your web pages in a primary language and then utilize translators to keep the content synchronized in multiple secondary languages. Whether you are maintaining your site in a single language or dozens of languages, the content localization system will help guide your content editors and translators through the process. Although content localization required extensive changes to the core platform, we have been able to add this new feature while still improving overall system performance.

| Improve this Doc View Source

GetLocale(String)

Gets the locale by code.

Declaration
public Locale GetLocale(string code)
Parameters
Type Name Description
System.String code

The code.

Returns
Type Description
Locale

A Locale instance or null.

Remarks

Content localization in DotNetNuke will allow you to easily manage your web pages in a primary language and then utilize translators to keep the content synchronized in multiple secondary languages. Whether you are maintaining your site in a single language or dozens of languages, the content localization system will help guide your content editors and translators through the process. Although content localization required extensive changes to the core platform, we have been able to add this new feature while still improving overall system performance.

| Improve this Doc View Source

GetLocaleOrCurrent(Int32, String)

Gets the locale included in the portal if culture code is not null or empty or else gets the current locale for current request to the portal.

Declaration
public Locale GetLocaleOrCurrent(int portalID, string code)
Parameters
Type Name Description
System.Int32 portalID

The portal ID.

System.String code

The code.

Returns
Type Description
Locale

A Locale instance or null.

Remarks

Content localization in DotNetNuke will allow you to easily manage your web pages in a primary language and then utilize translators to keep the content synchronized in multiple secondary languages. Whether you are maintaining your site in a single language or dozens of languages, the content localization system will help guide your content editors and translators through the process. Although content localization required extensive changes to the core platform, we have been able to add this new feature while still improving overall system performance.

| Improve this Doc View Source

GetLocales(Int32)

Gets the locales.

Declaration
public Dictionary<string, Locale> GetLocales(int portalID)
Parameters
Type Name Description
System.Int32 portalID

The portal ID.

Returns
Type Description
Dictionary<System.String, Locale>

A mapping from culture code to Locale, or null.

Remarks

Content localization in DotNetNuke will allow you to easily manage your web pages in a primary language and then utilize translators to keep the content synchronized in multiple secondary languages. Whether you are maintaining your site in a single language or dozens of languages, the content localization system will help guide your content editors and translators through the process. Although content localization required extensive changes to the core platform, we have been able to add this new feature while still improving overall system performance.

| Improve this Doc View Source

GetPublishedLocales(Int32)

Gets the published locales.

Declaration
public Dictionary<string, Locale> GetPublishedLocales(int portalID)
Parameters
Type Name Description
System.Int32 portalID

The portal ID.

Returns
Type Description
Dictionary<System.String, Locale>

A mapping from culture code to Locale.

Remarks

Content localization in DotNetNuke will allow you to easily manage your web pages in a primary language and then utilize translators to keep the content synchronized in multiple secondary languages. Whether you are maintaining your site in a single language or dozens of languages, the content localization system will help guide your content editors and translators through the process. Although content localization required extensive changes to the core platform, we have been able to add this new feature while still improving overall system performance.

| Improve this Doc View Source

IsDefaultLanguage(String)

Determines the language whether is default language.

Declaration
public bool IsDefaultLanguage(string code)
Parameters
Type Name Description
System.String code

The code.

Returns
Type Description
System.Boolean

true if the language is default language; otherwise, false.

Remarks

Content localization in DotNetNuke will allow you to easily manage your web pages in a primary language and then utilize translators to keep the content synchronized in multiple secondary languages. Whether you are maintaining your site in a single language or dozens of languages, the content localization system will help guide your content editors and translators through the process. Although content localization required extensive changes to the core platform, we have been able to add this new feature while still improving overall system performance.

| Improve this Doc View Source

IsEnabled(ref String, Int32)

Determines whether the specified locale code is enabled.

Declaration
public bool IsEnabled(ref string localeCode, int portalId)
Parameters
Type Name Description
System.String localeCode

The locale code.

System.Int32 portalId

The portal id.

Returns
Type Description
System.Boolean

true if the specified locale code is enabled; otherwise, false.

Remarks

Content localization in DotNetNuke will allow you to easily manage your web pages in a primary language and then utilize translators to keep the content synchronized in multiple secondary languages. Whether you are maintaining your site in a single language or dozens of languages, the content localization system will help guide your content editors and translators through the process. Although content localization required extensive changes to the core platform, we have been able to add this new feature while still improving overall system performance.

| Improve this Doc View Source

IsValidCultureName(String)

LocaleController provides method to manage all pages with localization content.

Declaration
public static bool IsValidCultureName(string name)
Parameters
Type Name Description
System.String name
Returns
Type Description
System.Boolean
Remarks

Content localization in DotNetNuke will allow you to easily manage your web pages in a primary language and then utilize translators to keep the content synchronized in multiple secondary languages. Whether you are maintaining your site in a single language or dozens of languages, the content localization system will help guide your content editors and translators through the process. Although content localization required extensive changes to the core platform, we have been able to add this new feature while still improving overall system performance.

| Improve this Doc View Source

PublishLanguage(Int32, String, Boolean)

Publishes the language.

Declaration
public void PublishLanguage(int portalid, string cultureCode, bool publish)
Parameters
Type Name Description
System.Int32 portalid

The portal ID.

System.String cultureCode

The culture code.

System.Boolean publish

if set to true will publish the language.

Remarks

Content localization in DotNetNuke will allow you to easily manage your web pages in a primary language and then utilize translators to keep the content synchronized in multiple secondary languages. Whether you are maintaining your site in a single language or dozens of languages, the content localization system will help guide your content editors and translators through the process. Although content localization required extensive changes to the core platform, we have been able to add this new feature while still improving overall system performance.

| Improve this Doc View Source

UpdatePortalLocale(Locale)

Updates the portal locale.

Declaration
public void UpdatePortalLocale(Locale locale)
Parameters
Type Name Description
Locale locale

The locale.

Remarks

Content localization in DotNetNuke will allow you to easily manage your web pages in a primary language and then utilize translators to keep the content synchronized in multiple secondary languages. Whether you are maintaining your site in a single language or dozens of languages, the content localization system will help guide your content editors and translators through the process. Although content localization required extensive changes to the core platform, we have been able to add this new feature while still improving overall system performance.

Implements

ILocaleController

Extension Methods

JsonExtensionsWeb.ToJson(Object)
  • View Source
Back to top by the community, for the community... #DNNCMS