Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > media > contrib-release > by-pkgid > b6fc9c249d9a5987aebaaf87444f84b8 > files > 4

apache-mod_i18n-0-6mdv2010.0.i586.rpm

/* Copyright 2006 Joachim Zobel <jz-2006@heute-morgen.de>.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

/*
 * mod_i18n implements Zopes i18n namespace in an output filter. It thereby
 * allows gettext based internationalization of arbitray html content 
 * delivered by apache.
 *
 * The i18n attribute that are currently implemented are:
 * translate, name, domain, target
 * attribute will soon follow.
 *
 * Requirements
 *    mod_xml2 is required for parsing the html. It has to be loaded 
 *      before mod_xml2.
 *    The prefork mpm has to be used, since GNU gettext is not threadsafe.
 *
 * It is compiled and installed as expected with
 * /usr/local/apache2/bin/apxs  -i -c -I /usr/include/libxml2 mod_i18n.c \
 *    /usr/local/lib/libxml2.la /usr/lib/libapreq2.la
 *
 * Configuration
 *
 * The name of the filter is i18n. The sax filter implemented by mod_xml2
 * has to be run before.
 *
 * Configuration Directives
 *
 * I18NLocaleDir <directory>
 * Context: server config, virtual host, directory, .htaccess
 * The directory that holds the locale directories used by gettext.
 *
 * I18NLangParam <name>
 * Context: server config, virtual host, directory, .htaccess
 * The GET parameter that is used to pass the language code to the i18n
 * filter.
 *
 * I18NLangParamForce
 * Context: server config, virtual host, directory, .htaccess
 * The language set by a request parameter takes precedence over the 
 * language set by target attributes.
 *
 */

/*
 * Choosing a language
 *
 * There are 2 ways to choose a language. Both take a language
 *    tag as defined by RFC 2616 (thats what is send with 
 *    Accept-Language). 
 * 1. You can configure a GET parameter name to use to
 *    select a language with I18NLangParam. 
 * 2. By an i18n target attribute.
 * You can interface with content negatiation by including 
 * negotiated target attributes with SSI.
 * By default target tags have priority over the language
 * parameter. This can be overriden with I18NLangParamForce.
 */