Index: openacs-4/packages/acs-core-docs/www/files/create-new-catalog.sh =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/files/create-new-catalog.sh,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/acs-core-docs/www/files/create-new-catalog.sh 26 May 2004 07:56:57 -0000 1.1 @@ -0,0 +1,51 @@ +#!/bin/bash +# create-new-catalog.sh +# @author: Hector Amado hr_amado@galileo.edu +# + +# From each catalog.xml in all packages, +# e.g. acs-subsite.es_ES.ISO-8859-1 --> acs-subsite.es_GT.ISO-8859-1 +# +# USAGE: +# Inside packages directory run ../bin/create-new-catalog.sh from new +# or +# sh ../bin/create-new-catalog.sh from new +# where from, new is the language id you copy and create +# +# eg. ../bin/create-new-catalog.sh es_ES es_GT + + +if [ $# -ne 2 ]; then + echo "" + echo " USAGE: sh ../bin/create-new-catalog.sh from new " + echo " eg. sh ../bin/create-new-catalog.sh es_ES es_GT" + echo "" + exit 1 + +fi + +from=$1 +new=$2 + +echo "Generating .$new. catalog files . . . " + +for i in $( ls -1 ); +do + ls -1R $i | grep .$from. > /dev/null + if [ $? -eq 0 ]; then + cd $i/catalog + for j in $(ls -1 ); + do + t=${j/$from/$new} + if [ x$t != x$j ]; then + cp $j $t + sed "s/$from/$new/" $t > temp.xml + mv temp.xml $t + echo $t + fi + done + cd ../../ + fi +done + +exit 0 Index: openacs-4/packages/acs-core-docs/www/xml/developers-guide/i18n.xml =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/xml/developers-guide/i18n.xml,v diff -u -r1.20 -r1.21 --- openacs-4/packages/acs-core-docs/www/xml/developers-guide/i18n.xml 23 Apr 2004 13:28:26 -0000 1.20 +++ openacs-4/packages/acs-core-docs/www/xml/developers-guide/i18n.xml 26 May 2004 07:56:57 -0000 1.21 @@ -868,6 +868,12 @@ + + + Avoid plurals + Different languages create plurals differently. Try to avoid keys which will change based on the value of a number. OpenACS does not currently support internationalization of plurals. If you use two different keys, a plural and a singular form, your application will not localize properly for locales which use different rules or have more than two forms of plurals. + + @@ -953,5 +959,6 @@ + When creating a new locale based on an existing one, such as creating the Guatamalan version of Spanish, you can copy the existing locale's catalog files using the script /packages/acs-core-docs/www/files/create-new-catalog.sh.