https://github.com/appleboy/codeigniter-i18n
i18n library for CodeIgniter 2.1.x
https://github.com/appleboy/codeigniter-i18n
Last synced: 9 months ago
JSON representation
i18n library for CodeIgniter 2.1.x
- Host: GitHub
- URL: https://github.com/appleboy/codeigniter-i18n
- Owner: appleboy
- Created: 2011-12-15T12:14:34.000Z (about 14 years ago)
- Default Branch: master
- Last Pushed: 2013-07-03T06:11:26.000Z (over 12 years ago)
- Last Synced: 2025-04-10T08:20:46.549Z (9 months ago)
- Language: PHP
- Homepage:
- Size: 105 KB
- Stars: 8
- Watchers: 3
- Forks: 9
- Open Issues: 0
-
Metadata Files:
- Readme: README.markdown
Awesome Lists containing this project
README
Internationalization (i18n) library for CodeIgniter
========================
It is a simple internationalization (i18n) for CodeIgniter 2.1.X
Requirement
========================
* CodeIgniter 2.1.X
* Enable Session
What it does
========================
Have the language field in the URL, exapmle:
* http://xxx.com/?lang=en-us
* http://xxx.com/index.php/welcome/index?lang=en-us
Installation
========================
copy application/config/language.php to your_app/application/config/
copy application/core/MY_Lang.php to your_app/application/core/
$ cp application/config/language.php our_app/application/config/
$ cp application/core/MY_Lang.php your_app/application/core/
Configuration
========================
Open application/config/language.php file
* language_field
You can find this field in URL, default value is "lang", example: xxx.com/?lang=zh-tw
* language_default_key
Default language you want to output.
* language_list
The language array lists you can support.
key: defined from $_['HTTP_ACCEPT_LANGUAGE']
value: corresponding to your language folder.
How to use
========================
application/language/english/about_lang.php
The language class will add prefix value on all language array key automatically.
example:
about_lang.php => key: about.xxxx
api_lang.php => Key: api.xxxx
Copyright
========================
Copyright (C) 2011 Bo-Yi Wu ( appleboy AT gmail.com )