|
There are no translations available.
This article relates to Joomfish 1.8 and Joomla 1.0 and is not relevant to Joomfish 2.0 on Joomla 1.5.
Encoding
The term Encoding refers to a relation between character codes and characters. It is also known as charset or character set. The ISO8859 standard defines a series of encodings for European languages, e.g. ISO 8859-1 to represent Western European languages like English, French, and German.
Q: Does the template need any special head tags to work properly with the Fish?
A: Actually yes. The fish is getting the charset from the language file of the LANGUAGE IN USE. So that means, if you set a hard-coded charset in your template, you will most probably have problems with other languages (encodings). You can use the following tag in order to be sure that the page will be loaded with the proper encoding: <meta http-equiv="Content-Type" content="text/html; <?php echo _ISO; ?>" />
The name "_ISO" here refers to the current encoding specified by the language in use. The term has other meanings in other contexts in Joom!Fish and Joomla; see the ISO article for more information.
Q: Does the Fish differentiate the language through to specific charset?
A: Actually its exacly the oposite, the Fish differentiate the charset through to specific language.
Q: So, in other words, it is possible to use utf-8 for example for English and German, too?
A: If you use UTF-8 for all of the languages you use, there is no problem the charset to be hard-coded in the template
Q: How can I have language specific templates (e.g. a different template for RTL and LTR languages)?
A: One solutions is to create a dummy template index.php file that checks which language is being viewed (you could check the glabal variable $mosConfig_lang) and include the appropriate language dependent index.php template file. index.php would look like:
<?php global $mosConfig_lang; if ($mosConfig_lang=="language1") include_once("language1Template.php"); else if ($mosConfig_lang=="language2") include_once("language2Template.php"); ?>
|
0 Comments