使用相同语言对两个不同地区/域进行本地化
我有一个位于美国的 WordPress 网站(例如 www.example.com)。我们的任务是创建一个英国/英国版本的网站,该网站拥有自己的域名(例如 www.example.co.uk),但共享相同的公共页面/帖子/后端。两个版本中大约 75% 的页面是相同的,但由于区域差异,会有一些部分(例如“关于”和“联系方式”)有所不同。
示例
美国网站 (www.example.com) 有 4 个页面:
- 首页
- 关于
- 服务
- 联系方式< /strong>
英国网站 (www.example.co.uk) 也有 3 个页面(2 个不同,1 个相同)
- 首页(与美国相同,但 URL 应为 www.example.co .uk)
- 关于 (内容不同,网址应为 www.example.co.uk/about)
- 服务 (与美国相同,但网址应为 www.example.co.uk/services)
- 联系方式(不同的内容,URL 应该是 www.example.co.uk/contact)
我如何设置英国/英国版本的网站,该网站使用相同的后端和大部分相同的内容基本站点,但有一些页面差异和不同 领域?
I have a Wordpress site which is based in US (ex. www.example.com). We've been tasked to create a UK/GB version of the site which has it's own domain (ex. www.example.co.uk), but shares the same common pages/posts/backend. About 75% of the pages are the same on both versions but there will be a few sections (like About and Contact) where they are different to account for regional differences.
Example
US site (www.example.com) has 4 Pages:
- Home
- About
- Services
- Contact
UK Site (www.example.co.uk) also has 3 pages (2 different, 1 the same)
- Home (The same as US, but the URL should be www.example.co.uk)
- About (Different content, the URL should be www.example.co.uk/about)
- Services (The same as US, but URL should be www.example.co.uk/services)
- Contact (Different content, the URL should be www.example.co.uk/contact)
How do I go about setting up the UK/GB version of the site which use the same backend and most of the same content from the base site, but has a few page differences and different domain?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我会使用 WPML 插件,它允许翻译具有语言文件的帖子、页面、类别、菜单和插件。它将让您的最终用户从同一管理区域登录,然后将翻译添加到现有内容。
棘手的一点是将其设置为在域检测上工作,通常它在子域上工作,或者在 URL 末尾添加一个变量,例如 ?lang=uk
但这说它应该是可能的,尽管需要进行一些修补根据 URL 进行设置。而且文档非常全面。祝你好运!
I'd use WPML plugin, it allows tranlations of posts, pages, categories, menus, and plugins that have language files. It will let your end use login from the same admin area, and then add translations to the existing content.
The tricky bit will be setting it up to work on domain detection, normally it works on a subdomain, or add's a variable to the end of the URL, like ?lang=uk
But that said it should be possible though with a bit of tinkering to setup something based on the URL. And the documentation is pretty comprehensive. Good luck!
也可以做不同的事情。对于我们的商店,我们假装有一个新域,但实际上没有。这也适用于搜索引擎优化,因为我们确实确保语言标签等是正确的。我们只替换一些部分,例如一些 javascript 和转换像素,然后就完成了。例如,请参见 Keepershandschoenen-shop.be。该站点实际上是一个克隆站点,因此我们不需要 wpml。我们甚至不需要 wordpress、magento 或任何 CMS 安装...
因此您拥有相同的后端,.com 也充当 .co.uk。
It's also possible to make it differently. For our shops we pretend there's a new domain, but in fact there isn't. This also works for SEO because we do make sure the language tags and such are correct. We replace only a few parts such as a few javascripts and conversion pixels and then we are done. See for example on Keepershandschoenen-shop.be. This site is in fact a clone so we don't need wpml. We don't even need a wordpress, magento or whatever CMS installation...
So then you have the same backend, with .com acting as .co.uk also.