{jr_lang_prepare}
The {jr_lang_prepare} function is used to "prepare" a template for using the {jr_lang} template function. If you would like your Skin and Theme templates to be multi-lingual, then this is the method to do so.
|
Tip: The {jr_lang_prepare} function should be the first function called at the very top of a template file, and only needs to be called once to be available to all templates that may be included within the template containing the {jr_lang_prepare} function call. |
Parameters:
Name |
Type |
Required |
Default |
Description |
default |
string |
yes |
n/a |
The "default" parameter tells Jamroom which language file to use as the "Default" language. The value given should be the name of the language file, minus the .php extension, and must be located within the "lang" sub directory of the skin/theme. |
theme |
string |
no |
n/a |
The "theme" option tells Jamroom that you want the language strings to be loaded from the language file found in the given "theme" lang directory - i.e. theme="Sage" |
skin |
string |
no |
n/a |
If the "skin" parameter is given, it tells Jamroom that you want the language strings to be loaded from the language file found in the given "skin" lang directory - i.e. skin="Sage" |
language |
string |
no |
n/a |
If the "language" string is given, it overrides the users preferred language and forces the strings to be pulled from the given language - i.e. language="en-US" |
Example Usage:
{* Bring in our language strings based on the users selected language *}
{jr_lang_prepare skin="Sage" default="en-US"}
<html>
<head>
<title>Welcome to Jamroom!</title>
</head>
.... |
|