TYPO3 翻译为非当前语言 [英] TYPO3 translate to NOT current language

查看:29
本文介绍了TYPO3 翻译为非当前语言的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有带模板的typo3 扩展:

I have typo3 extension with template:

{namespace v=Tx_Vhs_ViewHelpers}
<f:translate id="LLL:typo3conf/ext/my_ext/Resources/Private/Language/fr.locallang.xlf:labelTerms" />
<f:translate id="LLL:typo3conf/ext/my_ext/Resources/Private/Language/it.locallang.xlf:labelTerms" />

如果当前语言是法语,第一个标签翻译成法语,但第二个显示为英语(默认).当我将当前语言切换为意大利语时,第二个标签显示为意大利语,但第一个显示为英语

If current language is French, first label translated to French, but second displays in English (default). When I switch current language to Italian, second label displays in Italian but first displays in English

如何在一个页面上同时使用两种或多种语言?

How can I use two or more languages in same time on one page?

提前致谢.

推荐答案

基本上,你不能在一个页面上同时使用 2 种语言.TYPO3 将始终使用当前语言并准确地提供您所要求的内容.

Basically, you can not use 2 languages in the same time on a page. TYPO3 will always use the current language and give you exactly what you asked for.

您可以做的是在 TYPO3 翻译范围之外呈现翻译",这意味着您可以,例如,使用未由 typo3 翻译处理的翻译术语的另一个来源(可以是某个地方的数组,等等...)

What you can do is render the 'translations' outside the TYPO3 translation scope, meaning that you can, for ex, use another source of your translated terms that are not treated by typo3 translation (can be an array somewhere , etc ...)

或者在 xlif 本身中为特定语言实现其他语言的翻译.将 fr、it 等术语翻译成其他语言.

Or implement the translations of the other languages in the xlif itself for specific languages. Make the translation of the fr, it etc .. terms to be available in the other languages also.

<f:translate id="LLL:typo3conf/ext/my_ext/Resources/Private/Language/fr.locallang.xlf:labelTerms.ItVersion" />

<f:translate id="LLL:typo3conf/ext/my_ext/Resources/Private/Language/fr.locallang.xlf:labelTerms.FrVersion" />

这篇关于TYPO3 翻译为非当前语言的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆