From fffef541d62b153a3e79b03346931b6b989a6405 Mon Sep 17 00:00:00 2001 From: admin Date: Wed, 20 Sep 2006 23:39:28 +0000 Subject: --- user_guide/libraries/language.html | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'user_guide') diff --git a/user_guide/libraries/language.html b/user_guide/libraries/language.html index 98ef4b090..54f057d1b 100644 --- a/user_guide/libraries/language.html +++ b/user_guide/libraries/language.html @@ -68,6 +68,16 @@ Language Class

In your Code Igniter system folder you'll find one called language containing sets of language files. You can create your own language files as needed in order to display error and other messages in other languages.

+

Language files are typically stored in your system/language directory. Alternately you can create a folder called language inside +your application folder and store them there. Code Igniter will look first in your system/application/language +directory. If the direcotry does not exist or the specified language is not located there CI will instead look in your global +system/language folder.

+ +

Note:  Each language should be stored in its own folder. For example, the English files are located at: +system/language/english

+ + +

Creating Language Files

Language files must be named with _lang.php as the file extension. For example, let's say you want to create a file @@ -78,7 +88,7 @@ containing error messages. You might name it: error_lang.php

$lang['language_key'] = "The actual message to be shown";

Note: It's a good practice to use a common prefix for all messages in a given file to avoid collisions with -similarly named items in other files:

+similarly named items in other files. For example, if you are creating error messages you might prefix them with error_

$lang['error_email_missing'] = "You must submit an email address";
$lang['error_url_missing'] = "You must submit a URL";
-- cgit v1.2.3-24-g4f1b