Ben
Ben

Reputation: 1031

How to set up Variants for Entry Points of additional languages in TYPO3

The final domains of the project will be:

  1. www.domain.com (english, main language, L=0)
  2. www.domain.de (german, L=1)

The development/preview domains are

  1. dev.domain.com
  2. dev.domain.de

It is possible to create a Variant for the main "Entry Point" in tab "General" of the Site Configuration: Base: https://dev.domain.com/ Condition: applicationContext == "Development"

But how can I set up a variant for the second language (german)?

Upvotes: 1

Views: 1185

Answers (3)

Benni
Benni

Reputation: 1154

Since TYPO3 v9.5.5 baseVariants can be added directly in yaml for "base" values of site languages, the same way as the default "base" property in the site.

Upvotes: 1

Mikel Wohlschlegel
Mikel Wohlschlegel

Reputation: 1476

as long as you need no other language specific configuration, you could set env vars in your apache configuration and read them in your site configuration. This is officially supported (see here)

Site config:

base: 'https://%env(BASE_DOMAIN)%/'
languages:
  -
    base: 'https://%env(BASE_DOMAIN_DE)%/'

Apache config (example):

SetEnvIf Host ".*" TYPO3_CONTEXT=Production
SetEnvIf Host ".*" BASE_DOMAIN=www.domain.com
SetEnvIf Host ".*" BASE_DOMAIN_DE=www.domain.de
SetEnvIf Host "dev.domain.com" TYPO3_CONTEXT=Development
SetEnvIf Host "dev.domain.com" BASE_DOMAIN=dev.domain.com
SetEnvIf Host "dev.domain.de" TYPO3_CONTEXT=Development
SetEnvIf Host "dev.domain.de" BASE_DOMAIN_DE=dev.domain.de

Upvotes: 3

Georg Ringer
Georg Ringer

Reputation: 7939

This is not yet possible. The related issue can be checked out at https://forge.typo3.org/issues/86400.

I would solve that in the meantime by using different config.yml files.

Upvotes: 1

Related Questions