Globalization service methods

Version: 10.3

Service providers are wrapper objects designed to make it easier to interact with Connect pipelines. The providers implement no logic other than calling Connect pipelines. All of the business logic is implemented in the pipeline processors.

The Globalization service provider contains the following methods raising globalization related events.

CultureChosen method

Description:

Raises the Culture Chosen page event.

Usage:

Called when Sitecore needs to raise the Culture Chosen event.

Signature:

GlobalizationResult CultureChosen(CultureChosenRequest request)

Parameters:

ShopName – Mandatory

The name of the shop.

Culture – Mandatory

The chosen culture code.

Returns:

SystemMessages - Collection of messages from the external system.

Exceptions:

No exceptions are thrown by this method.

Usage example:

RequestResponse
var provider = (GlobalizationServiceProvider)Factory.CreateObject("globalizationServiceProvider", true);
var request = new CultureChosenRequest("StarterKit", "en-US");
var result = provider.CultureChosen(request);
if (!result.Success)
{
    // handle error.
}

Do you have some feedback for us?

If you have suggestions for improving this article,