Skip to content

Installation

Via Composer

composer require netthinks/nt-lingua

Activate via CLI:

vendor/bin/typo3 extension:setup
vendor/bin/typo3 cache:flush

Check for schema updates: Admin Tools → Maintenance → Analyze Database Structure.

After installation

1. Include TypoScript

In your sitepackage setup:

@import 'EXT:nt_lingua/Configuration/TypoScript/setup.typoscript'

2. Configure languages

Edit packages/nt-lingua/Configuration/Languages.php:

return [
    'en' => ['name' => 'English', 'rtl' => false, 'mode' => 'native',
             'sysLanguageUid' => 1, 'url' => '/en/'],
    'tr' => ['name' => 'Türkçe', 'rtl' => false, 'mode' => 'dom'],
    'ar' => ['name' => 'العربية', 'rtl' => true,  'mode' => 'dom'],
];
Key Required Description
name Yes Display label shown in the language switcher.
rtl Yes true for right-to-left scripts (Arabic, Hebrew, Persian). Adds dir="rtl" and mirrors the page layout.
mode Yes native — real TYPO3 site language (server-rendered, SEO-indexed, own URL). dom — client-side replacement (instant, no page reload, not indexed by search engines).
sysLanguageUid native only UID of the TYPO3 site language. Open Sites → your site → Languages to look it up.
url native only URL prefix as configured in the TYPO3 site (e.g. /en/). Must match the base field of that site language.

3. Add the language switcher

Option A — Sitepackage integration (navbar):

<f:render partial="Navigation/Language" section="Navbar" arguments="{_all}"/>

The LinguaProcessor data processor provides linguaNativeLanguages and linguaDomLanguages.

Option B — Floating widget (no sitepackage):

The extension automatically renders a floating globe button (bottom right, z-index 9990). To disable it when using the navbar variant:

page.99 >

4. Wrap content fields

In your Fluid template overrides, wrap translatable fields with data-ntlingua-* attributes:

<div data-ntlingua-uid="{data.uid}" data-ntlingua-field="bodytext">
    <f:format.html>{data.bodytext}</f:format.html>
</div>

5. Add the disclaimer

After </main> in your page layout:

<div class="nt-lingua-disclaimer" hidden aria-live="polite">
    <div class="container">
        <p class="nt-lingua-disclaimer__text">
            Automatically translated. No warranty for completeness or accuracy.
        </p>
    </div>
</div>