How to change the default locale provider?

Perhaps we should explain the purpose of a DefaultLocaleProvider first. A DefaultLocaleProvider is used to determine the locale of a request if the request does not already contain the information. E.g. if you open Sulu doesn’t know which localization should be displayed, because an english and a german version of the homepage is available. In this case the DefaultLocaleProvider is called to provide a default locale which is used to redirect to

Currently two providers are available. One makes use of the portal default localization configuration. The other tries to find the best matching locale based on the preferred language of the HTTP request.

You can provide an own DefaultLocaleProvider which has to implement the DefaultLocaleProviderInterface.

Available default locale providers:

Service ID



Use portal default localization configuration


Use preferred language of the HTTP request


Change the default locale provider service ID to the provider which fulfills your needs.

        provider_service_id: sulu_website.default_locale.request_provider