<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Design Notes</title><meta name="generator" content="DocBook XSL Stylesheets V1.65.1"><link rel="home" href="index.html" title="OpenACS Core Documentation"><link rel="up" href="i18n.html" title="Chapter�16.�Internationalization"><link rel="previous" href="i18n-convert.html" title="How to Internationalize a Package"><link rel="next" href="i18n-translators.html" title="Translator's Guide"><link rel="stylesheet" href="openacs.css" type="text/css"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><a href="http://openacs.org"><img src="/doc/images/alex.jpg" border="0" alt="Alex logo"></a><table width="100%" summary="Navigation header" border="0"><tr><td width="20%" align="left"><a accesskey="p" href="i18n-convert.html">Prev</a> </td><th width="60%" align="center">Chapter�16.�Internationalization</th><td width="20%" align="right"> <a accesskey="n" href="i18n-translators.html">Next</a></td></tr></table><hr></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="i18n-design"></a>Design Notes</h2></div></div><div></div></div><p>User locale is a property of ad_conn, <tt class="computeroutput">ad_conn locale</tt>. The request processor sets this by calling <tt class="computeroutput">lang::conn::locale</tt>, which looks for the following in order of precedence:</p><div class="orderedlist"><ol type="1"><li><p>Use user preference for this package (stored in ad_locale_user_prefs)</p></li><li><p>Use system preference for the package (stored in apm_packages)</p></li><li><p>Use user's general preference (stored in user_preferences)</p></li><li><p>Use Browser header (<tt class="computeroutput">Accept-Language</tt> HTTP header)</p></li><li><p>Use system locale (an APM parameter for acs_lang)</p></li><li><p>default to en_US</p></li></ol></div><p>For ADP pages, message key lookup occurs in the templating engine. For TCL pages, message key lookup happens with the <tt class="computeroutput">_</tt> function. In both cases, if the requested locale is not found but a locale which is the default for the language which matches your locale's language is found, then that locale is offered instead.</p></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="i18n-convert.html">Prev</a> </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right"> <a accesskey="n" href="i18n-translators.html">Next</a></td></tr><tr><td width="40%" align="left">How to Internationalize a Package </td><td width="20%" align="center"><a accesskey="u" href="i18n.html">Up</a></td><td width="40%" align="right"> Translator's Guide</td></tr></table><hr><address><a href="mailto:docs@openacs.org">docs@openacs.org</a></address></div><a name="comments"></a><center><a href="http://openacs.org/doc/current/i18n-design.html#comments">View comments on this page at openacs.org</a></center></body></html>