# Deluge and locale issues

## mrpringle

Hi,

I've got gentoo installed on two of my PC's, both running the latest unmasked amd64 kernel and deluge-1.0.7-r1. Just recently when I ran a system wide update followed by an etc-update, I noticed that locale.gen got replaced. So I set up en_GB and en_US locales followed by running locale-gen. Now deluge fails to run, but only on one of my systems, even though I performed the same updates and configured the same locales on both PC's.

The error is as follows:

```

[DEBUG   ] 21:49:59 configmanager:61 get_config_dir: /root/.config/deluge

Traceback (most recent call last):

  File "/usr/bin/deluge", line 8, in <module>

    load_entry_point('deluge==1.0.7', 'console_scripts', 'deluge')()

  File "//usr/lib64/python2.5/site-packages/deluge/main.py", line 91, in start_ui

    UI(options, args)

  File "//usr/lib64/python2.5/site-packages/deluge/ui/ui.py", line 54, in __init__

    ui = GtkUI(args)

  File "//usr/lib64/python2.5/site-packages/deluge/ui/gtkui/gtkui.py", line 105, in __init__

    locale.setlocale(locale.LC_ALL, '')

  File "/usr/lib64/python2.5/locale.py", line 478, in setlocale

    return _setlocale(category, locale)

locale.Error: unsupported locale setting

```

My locale.gen file is as follows

```

en_GB.UTF-8 UTF-8

en_GB ISO-8859-1

en_US ISO-8859-1

en_US.UTF-8 UTF-8

```

In my make.conf I have the following LINGUAS

LINGUAS="en_GB en"

I've obviously tried running locale.gen and re-merging deluge but this doesn't help. My system configurations are very similar so I'm not quite sure why deluge doesn't work on one of my systems.

Thanks in advance.

----------

## qxtr01

what does "locale" command return on your system?

----------

## mrpringle

 *qxtr01 wrote:*   

> what does "locale" command return on your system?

 

locale: Cannot set LC_CTYPE to default locale: No such file or directory

locale: Cannot set LC_MESSAGES to default locale: No such file or directory

locale: Cannot set LC_ALL to default locale: No such file or directory

LANG=en_AU.utf8

LC_CTYPE="en_AU.utf8"

LC_NUMERIC="en_AU.utf8"

LC_TIME="en_AU.utf8"

LC_COLLATE="en_AU.utf8"

LC_MONETARY="en_AU.utf8"

LC_MESSAGES="en_AU.utf8"

LC_PAPER="en_AU.utf8"

LC_NAME="en_AU.utf8"

LC_ADDRESS="en_AU.utf8"

LC_TELEPHONE="en_AU.utf8"

LC_MEASUREMENT="en_AU.utf8"

LC_IDENTIFICATION="en_AU.utf8"

LC_ALL=en_AU.utf8

----------

## qxtr01

localization is probably misconfigured in your system...

anyway what do you have in /etc/env.d/02locale file?

----------

## mrpringle

 *qxtr01 wrote:*   

> localization is probably misconfigured in your system...
> 
> anyway what do you have in /etc/env.d/02locale file?

 

LC_ALL="en_AU.utf8"

LANG="en_AU.utf8"

----------

## mrpringle

I'm a bit confused about all the localization settings which exists, for example in /etc/make.conf, /etc/locale.gen and /etc/env.d/02locale. I'm not sure how to fix the locale issue on my PC so if anyone can let me know that would be appreciated.

On my laptop which isn't experiencing the same issues I've got no /etc/env.d/02locale file and when I type the locale command all the  variables have POSIX set. All the apps and dictionaries on the notebook seem to work fine, so what is the point of this confusing locale crap anyway.

On that note I did try removing /etc/env.d/02locale on the PC which was experiencing the localization issues, but nothing seems to change after I reboot.

----------

## qxtr01

did you read the official localization guide?

----------

## mrpringle

I have read it but can't get the locale set up properly. For starters I tried removing /etc/env.d/02locale and restarted the PC, but when running locale I get the following output:

 *Quote:*   

> 
> 
> locale: Cannot set LC_CTYPE to default locale: No such file or directory
> 
> locale: Cannot set LC_MESSAGES to default locale: No such file or directory
> ...

 

This makes no sense to me because it should have removed the locale settings but it hasn't.

I would just be happy to remove the locales all together and use POSIX (whatever that is) because all the apps seem to run on my notebook and I don't have any locales set in /etc/env.d/02locale.

----------

## mrpringle

The problem was I needed to run env-update after changing the locale setting in /etc/env.d/02locale. I still don't get all the locale stuff, but everything works now.

----------

