UI.Lang - primitive string i18n

Synopsis

<script>LANG=es</script>
<script src="lib/MochiKit.js"></script>
<script src="lib/ui.js"></script> <!-- The order matters: the LANG
                                       declaration mustgoes before the
                                       ui.js import -->
<script>
assert(_("The value must be a number") == "El valor debe ser numérico")
</script>

Description

UI.Lang is a primitive attempt to make i18n on UI4W strings which are meant to be read by the user. By now, it doesn't offer much to the developer, but in a future it can become a mini i18n framework.

Dependencies

Overview

Language autodetection

If the global variable LANG is not set, this modules tries to autodetect the user language using the navigator.userLanguage, navigator.browserLanguage and navigator.language properties, on that order.

API Reference

TODO!

Authors

Copyright

Copyright 2005-2006 Leonardo Soto M. <leo.soto@gmail.com> and Imagemaker IT <http://www.imagemaker.cl>.

This program is licensed under the CDDL v1.0 license, see http://www.sun.com/cddl/cddl.html.