Internationalization with Codeigniter and smarty

综合编程 Hello, buddy! (源链)

What is the best way to do an international website using Codeigniter framework and smarty template ?

Because I really don’t know where begin ..

PS : I already have the librairies languages ..

Configuring Multi-Language Support

First we need to configure the necessary files before we can start using language support. The CodeIgniter config file, located in the application/config directory, contains an option called language which defines the default language of the application.

$config['language'] = 'english';

We also need to create the actual files which contain our messages in different languages. These files need to be placed inside the application/language directory with a separate directory for each language. For example, English language files should reside in the application/language/english directory, and French language files should be located in application/language/french.

Let’s create some language files that contain error messages for a sample application. Create the file english/message_lang.php (it’s important that all of the language files have the suffix _lang.php). The following code contains some sample entries for the content of our language file:

$lang["msg_first_name"] = "First Name";
$lang["msg_last_name"] = "Last Name";
$lang["msg_dob"] = "Date of Birth";
$lang["msg_address"] = "Address";

For more reference, refer this link


Get the current SQL CodeIgniter Active Record How to get the update settings in Active Record model callbacks? Is it possible to get a parameter list, which has been assigned...
CodeIgniter Form Validation: From Start to Finish As a web application developer, form validation is a crucial part of your work, and it should not be underrated as it could lead to security flaws in ...
No ‘Access-Control-Allow-Origin’ error... When Page loads in my console it shows this error Font from origin ' ' has been blocked from loading by Cross-Origin Resource...
Codeigniter does not display anything when trying ... I'm having a problem uploading files in CodeIgniter. This is my autoload: $autoload = array('url', 'form', 'file'); I have echoed out the ...
Codeigniter do_upload Does Not Respond ... for the past hour I've been cracking up to solve this problem. I'm quite new to Codeigniter. I made a page that will upload certain file types. It w...
Hello, buddy!责编内容来自:Hello, buddy! (源链) | 更多关于

本站遵循[CC BY-NC-SA 4.0]。如您有版权、意见投诉等问题,请通过eMail联系我们处理。
酷辣虫 » Internationalization with Codeigniter and smarty

专业 x 专注 x 聚合 x 分享 CC BY-NC-SA 4.0

使用声明 | 英豪名录