如何在Typo3 CMS中配置语言菜单

时间:2015-06-23 06:56:10

标签: php typo3 typoscript

您好我想在我的本地设置语言菜单如何在我的网站中配置多语言?我想要完全像:

DEUTSCH |英文

如果我点击英语,以便所有页面内容都是英文的,如果可能的话,然后逐步描述,因为我是typo3的新手。

3 个答案:

答案 0 :(得分:1)

下面的脚本可以帮助您更多地设置语言

    NO{
    {
      linkWrap = <li> | </li> 
      stdWrap.override = DEUTSCH || ENGLISH
      ATagTitle = DEUTSCH || ENGLISH
      stdWrap.typolink.parameter.data = page:uid
      stdWrap.typolink.additionalParams = &L=0 || &L=1
    }

有关详细信息,请访问https://jainishsenjaliya.wordpress.com/2012/11/05/language-menu-via-typoscript/

答案 1 :(得分:1)

    # Language Menu
    lib.lang_menu = COA
    lib.lang_menu {
        10 = HMENU
        10 {
            special = language
            special.value = 0,1
            1 = TMENU
            1 {
                expAll = 0
                wrap = <div class="lang"><span aria-hidden="true" class="glyphicon glyphicon-globe"></span><div class="btn-group"><button class="btn btn-default btn-xs dropdown-toggle language_menu" type="button" data-toggle="dropdown" aria-expanded="false">DE  <span class="caret"></span></button><ul class="dropdown-menu" role="menu">|</ul></div></div>
                wrap = <ul class="language">|</ul>
                NO = 1
                NO {
                    stdWrap.cObject = TEXT
                    stdWrap.cObject {
                        value =  DE || EN

                    } 
                    allWrap = <li>|</li>

                }
                RO < .NO
                RO = 1
                RO.ATagParams = class="hover"

                ACT < .NO
                ACT = 1
                ACT {
                    #ATagParams = |*| class="active" |*| class="active"
                    #doNotLinkIt = 1
                    allWrap = <li class="active">|</li>

                }

                USERDEF1 < .NO
                USERDEF1.allWrap =  <li>|</li>  
                USERDEF1.doNotLinkIt = 1    
            }
        }
    }


Also you need to configure in config.ts

# Considered DE is default.
config {
    htmlTag_langKey = de
    sys_language_uid = 0
    language = en
    locale_all = en_US
}


[globalVar = GP:L = 1]
config {
    htmlTag_langKey = en
    sys_language_uid = 1
    language = en
    locale_all = en_US
}
[global]

答案 2 :(得分:0)

以上拼写错误的脚本放在你的配置文件中

http://typo3.org/extensions/repository/view/static_info_tables

安装上述扩展程序,然后按照说明进行操作

enter image description here

然后在选择网站语言后创建您自己的语言并从下拉菜单中选择

enter image description here