简体   繁体   中英

Custom language TYPO3 site

I've been searching everywhere without any success for the possibility to add a custom language to my TYPO3 site. I would like to add Chinese/English with English as the language but a customized URL, Flag and Language name. The website is running TYPO3 v4.5.4 and upgrading is out of the question (If that would be suggestion).

Tl;dr A new flag and a new language name needs to be added to TYPO3 (To be used in front-end).

For how to work with languages in TYPO3 CMS, please see the link the the comment to your question.

For adding a language, please refer to the documentation which also includes examples to add custom fallbacks between languages. http://docs.typo3.org/typo3cms/CoreApiReference/Internationalization/Translation/Index.html#xliff-translating-languages

@frontend Multi-language

1) Create new Website Language on root level
- Add your language name, select flag
2) Localization view:
- Show page language version: (Add your page language)
- Edit page properties: (select your language flag)

Typoscript:
@page config

Set the default label and flag

mod.SHARED.defaultLanguageLabel = English
mod.SHARED.defaultLanguageFlag = gb

@Fontend menu for language

Language Menu

menu.lang_menu = COA
menu.lang_menu {
    10 = HMENU
    10 {
        special = language
        special.value = 0,1
        1 = TMENU
        1 {
            expAll = 0
            wrap = |
            NO = 1
            NO {
                stdWrap.cObject = TEXT
                stdWrap.cObject {
                    value =  EN||/DE

                } 
                allWrap = <span>|</span>
            }
            #RO < .NO
            #RO = 1
            #RO.ATagParams = class="hover"

            ACT < .NO
            ACT = 1
            ACT {
               allWrap = <span class="selected">|</span>
               #doNotLinkIt = 1
            }            
            CUR < .NO
            CUR = 1
            CUR {
               allWrap = <span class="selected">|</span>
               #doNotLinkIt = 1
            }
        }
    }
}

Hope this post your help:)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM