在TYPO3中设置多语言站点 [英] Setting a multilanguage site in TYPO3
问题描述
我正在尝试使用typo3建立一个多语言站点,但是我遇到了一些麻烦.该网站的默认语言是德语,但我也想使用英语和法语.所以我又定义了2种语言:ID = 2的英语和ID = 3的法语
I'm trying to set up a multilanguage site with typo3, but Im having some trouble. The default language of the site is German, but I also want to have it in English and French. So I went to define 2 more languages: English with ID=2 and French with ID=3
接下来,我将此打字稿添加到我的模板中:
Next I added this typoscript to my template:
config.linkVars = L
config.uniqueLinkVars = 2
config.sys_language_overlay = content_fallback
config.language = de
config.locale_all = de_DE
config.htmlTag_langKey = de-DE
config.sys_language_uid = 0
[globalVar = GP:L = 2]
config.language = en
config.locale_all = en_EN
config.htmlTag_langKey = en-EN
config.sys_language_uid = 2
[globalVar = GP:L = 3]
config.language = fr
config.sys_language_uid = 3
config.locale_all = fr_FR
config.htmlTag_langKey = fr-FR
[end]
然后我从扩展名 srlanguagemenu 中添加了该语言菜单:>
And then I added this language menu, from the extension srlanguagemenu:
10 < plugin.tx_srlanguagemenu_pi1
10{
languagesUidsList = 0,2,3
defaultLayout = 2
showLinkWithFlag = 0
showCurrent = 1
}
但是菜单仅显示英语".这是确切的标记:
But the menu only shows "English". This is the exact markup:
<div class="tx-srlanguagemenu-pi1">
<div class="CUR"><img src="typo3/gfx/content_client.gif" alt="" style="width:7px; height:10px;"><a href="index.php?id=46">English</a></div>
<div class="SPC"> </div> <div class="INACT"></div>
<div class="SPC"> </div> <div class="INACT"></div>
</div>
也.在菜单中,页面名称未显示翻译版本.
Also. In the menu, the name of the pages doesn't show the translated version.
我在做什么错了?
推荐答案
您不仅需要翻译页面内容,还需要翻译页面.这是通过创建"alternative_page_language"(德语为"alternative Seitensprache")完成的.
You need to translate not only the content of your page, but also the page. This is done via creating an "alternative_page_language" ("alternative Seitensprache" in german).
您可以通过 HMENU.special =语言.
要使用翻译,请查看INFO-Modul.有一个本地化概述",请不要错过:)我想您已经在页面模块中找到了视图"语言.
For working with translations, have a look at the INFO-Modul. There is a "Localization Overview", don't miss it:) I guess you already found the language View in the Page Modul.
这篇关于在TYPO3中设置多语言站点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!