在codeigniter中的几种语言 [英] several languages in codeigniter

查看:95
本文介绍了在codeigniter中的几种语言的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在一个网站(codeigniter框架)上实现多种语言。设计中有四个国家标志。当用户点击任何标志页面应该加载所选语言的信息。网站上没有注册(网站很简单)。

I want to implement several languages on one site (codeigniter framework). There are four country flags in the design. When user click on any flag the page should load the information in chosen language. There is no registration on the site (The site is quite simple).

我想要我的网址如下: http://site.com/en/controller/

I'd like my url's to be like this: http://site.com/en/controller/

最好的(最简单的)方法是什么?

What's the best(most simple) way of doing it ?

推荐答案

这里有一个Code Igniter指南:

There is a Code Igniter guide for this here:

CI Wiki:国际化语言类

国际化和模板解析器类

不幸的是没有web框架会为你解决这个,它只能使它更容易。内容将被复制在语言等。这是做什么是帮助您并行的网站的M_C部分。您需要全部翻译这些视图。

Unfortunately no web framework will "solve" this for you, it can only make it easier. Content will be replicated in the languages, etc. What this does is help you make in parallel the M_C portion of the site. The views will need to all be translated still by you.

这篇关于在codeigniter中的几种语言的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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