Imagine you have a Sulu site in Russian and need to add English, but the URLs for each language should be different — ru.example.com and en.example.com. You search, find Sulu's documentation on Webspace, but run into nuances: how to properly copy the page structure without losing data? How to configure hreflang so Google doesn't complain? A typical mistake is skipping the sulu:webspace:copy-locale command, after which content duplicates and SEO breaks. We've been through this path dozens of times and have collected ready configurations, explanations, and lifehacks. Order a multilingual site setup and get a turnkey solution.
The Problem: Multilingualism in Sulu Seems Complex, but It's Not
Clients often come with the question: "How to make a website in Russian and English so that content is independent and URLs are clean?" We have accumulated practical experience in configuring Sulu and developed an approach that works without surprises. Below are ready configurations, explanations, and lifehacks. Using Webspace saves up to 30% of time compared to custom Symfony-based solutions.
How Webspace and Multilingualism Work in Sulu
Sulu builds multilingualism and multisite around the concept of Webspace. One Webspace — one site with a set of languages and portals (subdomains/URL prefixes). Multiple Webspaces in a single instance — a full multisite with a shared backoffice and independent content. As stated in the official Sulu documentation, the Webspace is the root node of the content tree.
| Element | Description |
|---|---|
| Webspace | Logical site (example.com, blog.example.com) |
| Portal | Access variant for a Webspace (production, staging, dev) |
| Localization | Content language (ru, en, de) |
| URL | Language-to-domain or path binding |
One Webspace can be served from multiple domains. The reverse is not possible — one domain always belongs to a single Webspace.
How to Configure a Multilingual Webspace? Step-by-Step Guide
-
Create an XML configuration in
config/packages/webspaces/. Example for a main site with three languages (Russian as default):
<webspace xmlns="http://schemas.sulu.io/webspace/webspace" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://schemas.sulu.io/webspace/webspace http://schemas.sulu.io/webspace/webspace-1.1.xsd"> <name>Main Site</name> <key>main</key> <localizations> <localization language="ru" default="true" xDefault="true"/> <localization language="en"/> <localization language="de"/> </localizations> <shadow-base-language>ru</shadow-base-language> <default-templates> <default-template type="page">default</default-template> <default-template type="home">homepage</default-template> </default-templates> <templates> <template type="page">default</template> <template type="page">article</template> <template type="home">homepage</template> </templates> <excluded-templates> <excluded-template>overview</excluded-template> </excluded-templates> <portals> <portal> <name>Main</name> <key>main</key> <environments> <environment type="prod"> <urls> <url language="ru" redirect="false">example.com</url> <url language="en">en.example.com</url> <url language="de">de.example.com</url> </urls> </environment> <environment type="stage"> <urls> <url language="ru">stage.example.com</url> </urls> </environment> <environment type="dev"> <urls> <url language="ru">example.localhost</url> <url language="en">en.example.localhost</url> </urls> </environment> </environments> </portal> </portals> </webspace> - Run initialization:
php bin/console cache:clear php bin/console sulu:document:initialize php bin/console sulu:phpcr:init --user=admin php bin/console sulu:webspace:copy-locale main --from=ru --to=en sulu:webspace:copy-locale copies the page tree structure from one language to another — convenient when adding a new language to an already populated site. Without this command, pages would have to be created from scratch in each language.
- Configure URL portals for each environment as shown in the config. For the production environment, use live domains.
What Are Shadow Pages and How to Use Them?
A shadow page displays content from another language without creating a separate translation. It is enabled in the backoffice via a toggle. This saves time on translations for sections where they are not needed (e.g., contacts, about company). Configuration via API:
$document = $this->documentManager->find('/cmf/main/contents/about', 'en'); $document->setShadowLocale('ru'); $document->setShadowLocalesEnabled(true); $this->documentManager->persist($document, 'en'); $this->documentManager->flush(); Shadow pages are useful when you want to keep unified content for all languages but still have different URLs (via the URL strategy).
What URL Strategies for Languages Does Sulu Support?
Sulu supports three URL configuration options:
| Strategy | Example | When to Use |
|---|---|---|
| Subdomains | ru.example.com, en.example.com | Geographic targeting (hreflang with x-default) |
| Path prefix | example.com/ru, example.com/en | Easier to set up, single domain |
| Separate domains | example.ru, example.com | For brands with different domains |
For SEO, be sure to add hreflang in the <head> (see MDN documentation):
{% for locale in ['ru', 'en', 'de'] %} <link rel="alternate" hreflang="{{ locale }}" href="{{ sulu_content_path(null, webspace, locale) }}"> {% endfor %} <link rel="alternate" hreflang="x-default" href="{{ sulu_content_path(null, webspace, 'ru') }}"> A language switcher in Twig is best implemented considering the available locales and the aria-current attribute — we provide this code as part of the setup.
What's Included in a Multilingual Sulu Site Setup?
We provide:
- Webspace configuration with the required locales and portals
- URL strategy setup (subdomains, prefix, separate domains)
- Implementation of language switcher and hreflang
- Shadow page configuration for non-translatable sections
- Editor access permissions per Webspace
- Operations documentation
- Editor training for multilingual content management
- 30-day warranty for correct operation
Why Trust Us with Your Setup?
We have been working with Sulu since its inception and have completed over 15 multilingual projects. Our engineers are contributors to the Sulu community and know all the pitfalls. We guarantee that Webspace-based configuration is 3 times faster than custom Symfony solutions. Contact us for a consultation — we will evaluate your project within a day. Order a multilingual site setup and get a ready turnkey solution. The cost of multilingual setup is typically lower than rewriting the system from scratch. The cost is determined after analysis.
Setup Timeline
- Adding a second language to an existing site: 1–2 days.
- Configuring a multisite with two Webspaces from scratch: 2–3 days.
- Full configuration (3 languages, 2 Webspaces, shadow pages, hreflang, navigation): 4–5 days.
Cost is calculated individually depending on complexity and number of languages.







