Home Documentation General Docs Encoding
Encoding PDF Print E-mail
Written by Ivo Apostolov   
Wednesday, 25 April 2007 23:29

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

Add Comment

Joom!Fish 2.0 RC1 Public Release

Joom!Fish 2.0 RC1 will be available to the public after
Join the Joom!Fish Club and get it now.

Selected Contributors

From the Joom!Fish Core team (Alex, Geraint, Ivo & Robin) a big thank you to all the people of the JoomFish community!
Special thank's for testing, good suggestions, translations and forum moderation to:

  • Tommy White for the cute logo design
  • Bernhard, Michael, Luc, Olivier, Robin, Rune, Akarawuth
  • Harri <aka tassu> for moderation

Ads by Google