TYPO3 loading default language instead of translat

2019-09-20 04:36发布

问题:

I'm using TYPO3 (with no other choice for the moment) and I have to add a secondary language to the website.

I have 2 languages:

  • Default : English (en) set as L = 0
  • English US (en_US) set as L = 1

I've made the change in the RealUrl and in the main template.

config.sys_language_uid = 0
config.language = en
config.locale_all = en_US.UTF-8
page.config.language = en

config.linkVars = L

[GLOBAL]

[globalVar = GP:L = 1]
  config {
    sys_language_uid = 1
    htmlTag_langKey  = en_US
    language = en_US
    locale_all = en_US.UTF-8
  }
[end]

[GLOBAL]

And

'preVars' => array(
      array(
                'GETvar' => 'no_cache',
                'valueMap' => array(
                    'no_cache' => 1,
                ),
                'noMatch' => 'bypass',
            ),
            array(
                'GETvar' => 'L',
                'valueMap' => array(
                    'en' => '0',
                    'en_US' => '1',
                ),
                'noMatch' => 'bypass',
                'valueDefault' => 'en',
            ),
    ),

So far, my language is created, both the original and the translation of my page appear on the Page Editing of TYPO3.

The URL works (www.mywebsite.com/en_US/mypage.html).

From this point it doesn't work anymore : The page is generated, with the good URL, but loading the default language content. (even with the preview test www.mywebsite.com/index.php?id=123&L=1 is not loading the good content)

Did I miss something ?

回答1:

Resolved:

Forgot to precise the Original translation in the Page Edition

Select the original in the list (Transl.Orig) of the "General" tab of page editing.