如何将翻译添加到Plone网站首页 [英] How can I add translations to a Plone site front-page

查看:112
本文介绍了如何将翻译添加到Plone网站首页的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在用英语和西班牙语编写的网站中使用LinguaPlone.除首页文件夹外,所有网站页面和文件夹都可以翻译.我认为我可以翻译首页文件夹用作视图的页面,但是在这种情况下,当用户转到首页时,仅显示文件夹视图(不显示其翻译).

I'm using LinguaPlone in a site thas is written in English and Spanish. All site pages and folders can be translated, except the front page folder. I think that I can translate the page that the front page folder uses as view, but in that case when a user goes to front page, only the folder view is showed (not its translation).

我正在使用Plone 4.1.4和LinguaPlone 4.1.2.也许我需要尝试其他工具,例如raptus.multilingualplone.

I'm using Plone 4.1.4 and LinguaPlone 4.1.2. Maybe I need to try with other tool, as raptus.multilingualplone.

推荐答案

通常,在设置LinguaPlone网站时,您可以让LinguaPlone创建充当导航根目录的顶级每种语言的文件夹.网站本身的根目录设置为使用语言选择器,根据访问者的语言偏好和其他因素将访问者重定向到其中一个根目录.

Normally, when setting up a LinguaPlone site you let LinguaPlone create top-level per-language folders that act as navigation roots. The root of the site itself is set up to redirect visitors to one of these roots depending on their language preferences and other factors, using a language selector.

请参阅 http://www.norden.org/,以获取此类网站的示例.请注意,当您访问该URL时,您将自动重定向到一种受支持的语言,通常重定向到 http://www. norden.org/en/为英语.您可以在左上方的可用语言之间进行切换,然后您会看到URL的第一个元素在语言代码之间发生了变化.这些是顶级文件夹.

Take a look at http://www.norden.org/ for an example of such a site. Notice that when you visit that URL you are automatically redirected to one of the supported languages, usually to http://www.norden.org/en/ for english. You can switch between the available languages on the top left, and you'll see that the first element of the URL changes between the language codes. Those are the top-level folders.

这里的优点是这些文件夹中的每个文件夹都可以拥有自己的默认视图.另一个是URL对访问者来说总是很清晰.从关于此网站"(http://www.norden.org/en/about-this-website)切换到挪威语翻译,您最终会进入

The advantage here is that each of these folders can have it's own default view. Another is that URLs are always crystal clear for visitors; switch from "About this website" (http://www.norden.org/en/about-this-website) to the Norwegian translation and you end up on on http://www.norden.org/no/om-nettstedet; anyone can see that the new URL is in the Norwegian language even if they do not understand that language.

事实上,您可以根据 LinguaPlone安装说明;只需访问URL:

You can set up these language folders after the fact, as documented in the LinguaPlone installation instructions; simply visit the URL:

http://localhost:8080/Plone/@@language-setup-folders

但是请务必先备份您的网站,并根据您的当地情况调整地址.

but be sure to backup your site first and to adjust the address for your local situation.

这篇关于如何将翻译添加到Plone网站首页的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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