[Bug 1394929] Re: Please provide 'locales-all' as in Debian

Matthias Klose doko at ubuntu.com
Fri Nov 21 12:01:42 UTC 2014


the package is not required. you can generate the locales on the fly for
package builds (or build-depending on various language-pack packages).

$ cat locale-gen
#!/bin/sh

LOCPATH=`pwd`/locales
export LOCPATH

[ -d $LOCPATH ] || mkdir -p $LOCPATH

umask 022

echo "Generating locales..."
while read locale charset; do
        case $locale in \#*) continue;; esac
        [ -n "$locale" -a -n "$charset" ] || continue
        echo -n "  `echo $locale | sed 's/\([^.\@]*\).*/\1/'`"
        echo -n ".$charset"
        echo -n `echo $locale | sed 's/\([^\@]*\)\(\@.*\)*/\2/'`
        echo -n '...'
        if [ -f $LOCPATH/$locale ]; then
            input=$locale
        else
            input=`echo $locale | sed 's/\([^.]*\)[^@]*\(.*\)/\1\2/'`
        fi
        localedef -i $input -c -f $charset $LOCPATH/$locale #-A /etc/locale.alias
        echo ' done'; \
done <<EOF
de_DE                   ISO-8859-1
de_DE at euro              ISO-8859-15
en_HK                   ISO-8859-1
en_US.UTF-8             UTF-8
es_ES                   ISO-8859-1
EOF

echo "Generation complete."

$ LOCPATH=... <run your command>

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to glibc in Ubuntu.
https://bugs.launchpad.net/bugs/1394929

Title:
  Please provide 'locales-all' as in Debian

Status in “glibc” package in Ubuntu:
  Confirmed

Bug description:
  Hi,

  Debian provides a 'locales-all' package, which is very convenient to
  ensure all locales are available, and installs very quickly.

  It's particularly handy when providing i18n'd web applications (e.g. that use php-gettext).
  As they may be accessed by visitors of all supported languages, rather than documenting how the server administrator should enable a list of 10-15 languages by reconfiguring 'locales', the packager can just add 'locales-all' to the Recommends or Depends.
  See for instance the FusionForge package in Debian (https://packages.debian.org/jessie/gforge-web-apache2).

  Cheers!
  Sylvain

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/glibc/+bug/1394929/+subscriptions



More information about the foundations-bugs mailing list