About Sitellite       Screenshots       Downloads       Forge      Documentation       Community       Support

You are here: Home / Documentation / How To: XT Template Essentials

How To: XT Template Essentials

I18n

Internationalization (I18n) is the last feature I'm going to talk about in this article.  I18n in XT is very straight-forward: Any text between <xt:intl></xt:intl> tags is passed to the Sitellite intl_get() function, which returns the same text translated into the appropriate language (see the inc/lang folder for the translation files, and the I18n class in SAF as well).

Another convenient feature of XT's <xt:intl> tag is that it actually replaces the text with the appropriate translation and also wraps the translation in a <span></span> tag with the appropriate lang="" and xml:lang="" attributes.  For example:

<xt:intl>Hello</xt:intl>

Might translate into French as:

<span lang="fr" xml:lang="fr">Bonjour</span>

And there you have it, instant multi-lingual capabilities.  To see this in action, adjust your browser settings to prefer French over English, and Sitellite will automatically adjust upon refreshing your browser window.

Next Up: XT Object Reference

Page 1: Introduction
Page 2: First Steps
Page 3: Substitutions (Part 2)
Page 4: Conditions
Page 5: Loops
Page 6: Includes
Page 7: Boxes
Page 8: I18n
Page 9: XT Object Reference

All Tutorials

Members

Note: You can use your SitelliteForge.com account here and vice versa.

Username

Password

Forgot your password?

Not a member? Click here to register

Sitellite 5 Beta


Copyright © 2008, SIMIAN systems Inc.
All rights reserved. Privacy policy
Some of the icons on this site were created by the Gnome Project.