PHPackages                             netzmacht/contao-i18n - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Localization &amp; i18n](/categories/localization)
4. /
5. netzmacht/contao-i18n

ActiveContao-bundle[Localization &amp; i18n](/categories/localization)

netzmacht/contao-i18n
=====================

This library provides a toolkit for flexible i18n websites..

4.0.4(3mo ago)67401[1 PRs](https://github.com/netzmacht/contao-i18n/pulls)LGPL-3.0-or-laterPHPPHP ^8.1CI passing

Since Oct 9Pushed 2mo ago1 watchersCompare

[ Source](https://github.com/netzmacht/contao-i18n)[ Packagist](https://packagist.org/packages/netzmacht/contao-i18n)[ RSS](/packages/netzmacht-contao-i18n/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (22)Versions (24)Used By (0)

Contao I18n
===========

[](#contao-i18n)

[![Build Status](https://camo.githubusercontent.com/19b077eca7f18011aac3579056f04fd9221779b7f38b867cabee51151d04482c/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6e65747a6d616368742f636f6e74616f2d6931386e2f646961676e6f73746963732e796d6c3f7374796c653d666c61742d737175617265266272616e63683d6d6173746572)](https://github.com/netzmacht/contao-i18n/actions/workflows/diagnostics.yml)[![Version](https://camo.githubusercontent.com/2bdb134b0d3758ce8afb374fe61c5a85c0276efc716df5e76bdc0d7f0e630ab7/687474703a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6e65747a6d616368742f636f6e74616f2d6931386e2e7376673f7374796c653d666c61742d737175617265)](http://packagist.com/packages/netzmacht/contao-i18n)[![License](https://camo.githubusercontent.com/68a9fc7f47f2f699068ac639482eb0dc5126f1b80d252924eb8dd144258b1755/687474703a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6e65747a6d616368742f636f6e74616f2d6931386e2e7376673f7374796c653d666c61742d737175617265)](http://packagist.com/packages/netzmacht/contao-i18n)[![Downloads](https://camo.githubusercontent.com/8bb34f73c446da21c5d432c4da5bd531fc9a8caa0d11c2dc2910f0a78d98818e/687474703a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6e65747a6d616368742f636f6e74616f2d6931386e2e7376673f7374796c653d666c61742d737175617265)](http://packagist.com/packages/netzmacht/contao-i18n)

This extension provides a flexible way for multilingual websites where parts of the main language should be reused on the translated pages.

Install
-------

[](#install)

You can install this extension using Composer.

```
$ php composer.phar require netzmacht/contao-i18n:^4.0

```

Requirements
------------

[](#requirements)

- PHP `^8.1`
- Contao `^5.3`
- Usage of [terminal42/contao-changelanguage](https://github.com/terminal42/contao-changelanguage)

Features
--------

[](#features)

### Language aware redirects

[](#language-aware-redirects)

The main idea of the repository is you want to reuse modules or content from the main page in the translations. If you do so, most links or redirects would go back to the main language.

That's where this extension hooks into. It detects references to pages in another language tree. If it's the case, it tries to find the translation and manipulates the target page to the translation.

It works for all page references. No matter if you have a jumpTo in your form or module. But you stay in control. You can disable this behaviour by disable it in the page of the main language. Also the change language module is blacklisted, so you are still able to link to another language.

1. Set up the pages and connect pages as usual with changelanguage.
2. Set the redirect page to the fallback language.
3. If you want to disable the *"page translation"*, you may configure it in your page setting.

So you only have to define the language relations once! And you keep control if language redirects are required.

### Same pages in different languages

[](#same-pages-in-different-languages)

Sometimes you have to translate your website, but some pages stay identical. If you use different page aliases in your language tree the fallback page is not loaded.

The `I18n Regular page` is designed to solve this issue. It simply loads all the content of the fallback page. So it's possible to have language-aware aliases but use the same content without duplication.

On top of it the language is kept. This means that Contao uses the language defined in the page settings. This enables you to use insert tags to translate contents.

### Same news, events and faqs in different languages

[](#same-news-events-and-faqs-in-different-languages)

If you want to reuse news, events and faqs in different languages, it's supported. You only have to use the `I18n Regular page` as the reader page in the translation tree. This extension automatically creates the search page entries and sitemap entries for you.

**Known limitation**: The rss feed are not translated at the moment.

### Translation insert tags

[](#translation-insert-tags)

The two features above allow you to reduce the stupid duplication of modules or page when where is no difference. But sometimes some labels has to be translated as well.

Use the `{{translate::*}}` insert tag for this or even it's shortcut `{{t::*}}`.

Following syntax is supported:

`{{t::path.to.translation}}`Try to get the translation from the page\_ALIAS domain. Fallback to website domain if not translated. If the page type is an i18n page type, the alias of the base page is used instead.

In other words, you have to create a `page_ALIAS.php` translation file. If you have website wide translations use the `website.php` language file.

If no page alias is given, the page id is used instead. Folder aliases get escaped to underscores.

`{{t::domain:path.to.translation}}`Translate from a custom domain.

Note: The dot syntax is used for the array structure of the language file. Note: Nested insert tags are supported in the translation strings.

### Navigation modules

[](#navigation-modules)

This extension provides two navigation modules which goes a step further. They does not only replace the url but the whole page. So you get an translated navigation module even if you have a reference page set in a navigation module or you use an individual navigation.

Configuration
-------------

[](#configuration)

By default, contao-i18n does not delete any articles in the contao i18n regular page. If they are not connected as page to override other pages, they are simply ignored. However, you can enable the cleanup. If cleanup is enabled all articles are deleted which are not configured as an article override.

```
# app/config/config.yml

netzmacht_contao_i18n:
    article_cleanup: true
```

Development
-----------

[](#development)

This repository contains a [ddev](https://github.com/ddev/ddev) configuration for a local test and development environment of this extension. It also provides a snapshot of the database. So it's easy to set up a local instance for yourself. For the general usage of ddev read the [ddev documentation](https://ddev.readthedocs.io).

Following credentials are used:

**Backend user**

- Username: `admin`
- Password: `adminuser`

**Install tool**

- Password: `adminuser`

###  Health Score

53

—

FairBetter than 97% of packages

Maintenance82

Actively maintained with recent releases

Popularity22

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity82

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 94.5% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~209 days

Recently: every ~182 days

Total

19

Last Release

111d ago

Major Versions

1.1.0-rc1 → 2.0.0-rc12018-03-02

2.0.3 → 3.0.02023-03-29

3.0.1 → 4.0.12025-05-23

PHP version history (3 changes)1.0.0-beta1PHP &gt;=5.4

2.0.0-rc1PHP ^7.1

3.0.0PHP ^8.1

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/8189209?v=4)[netzmacht](/maintainers/netzmacht)[@netzmacht](https://github.com/netzmacht)

---

Top Contributors

[![dmolineus](https://avatars.githubusercontent.com/u/1186266?v=4)](https://github.com/dmolineus "dmolineus (155 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (8 commits)")[![fritzmg](https://avatars.githubusercontent.com/u/4970961?v=4)](https://github.com/fritzmg "fritzmg (1 commits)")

---

Tags

i18nlanguagel10nmultilingualcontao

### Embed Badge

![Health badge](/badges/netzmacht-contao-i18n/health.svg)

```
[![Health](https://phpackages.com/badges/netzmacht-contao-i18n/health.svg)](https://phpackages.com/packages/netzmacht-contao-i18n)
```

###  Alternatives

[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.4k5.6M651](/packages/sylius-sylius)[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.3M152](/packages/sulu-sulu)[shopware/platform

The Shopware e-commerce core

3.3k1.5M3](/packages/shopware-platform)[contao/core-bundle

Contao Open Source CMS

1231.6M2.4k](/packages/contao-core-bundle)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

595.2M386](/packages/shopware-core)[ec-cube/ec-cube

EC-CUBE EC open platform.

78527.0k1](/packages/ec-cube-ec-cube)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
