TYPO3 loading default language instead of translation

江枫思渺然 提交于 2019-12-13 08:05:49

问题


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.



来源:https://stackoverflow.com/questions/44840988/typo3-loading-default-language-instead-of-translation

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!