setting language to de_CH problems

Hi all
I am not sure if this the right place for this. So if in the wrong place, kindly move to the right place:

We got Leap 15.0 laptops throughout our family, using plasma. My sons machine is dead now, so I tried to set an old lenovo T500 up as a substitute from scratch. It was on Leap 42.3, where locale was set to de_CH throught YaST2. After installing Leap 15.0, I tried to set de_CH in YaST2/language, but it says it cannot find it, as /usr/share/YaST2/data/languages/language_de_DE.ycp is missing. In fact:

/usr/share/YaST2/data/languages # ls | grep -i DE
language_de_DE.ycp

However:

locale -a | grep -i DE
de_AT
de_AT@euro
de_AT.utf8
de_BE
de_BE@euro
de_BE.utf8
de_CH
de_CH.utf8
de_DE
de_DE@euro
de_DE.utf8
de_IT
de_IT.utf8
de_LI.utf8
de_LU
de_LU@euro
de_LU.utf8
fy_DE
gez_ER@abegede
gez_ET@abegede
hsb_DE
hsb_DE.utf8
ks_IN@devanagari
nds_DE
sd_IN@devanagari

1] So, my conclusion basically YaST2 lists ***de_CH.utf8 ***but as the file “language_de_CH.ycp”, it cannot set the locale correctly. Am I right?

2] If, where are all these “language_de_XX.ycp” gone?

Suggested workaround:

cp language_de_DE.ycp language_de_CH.ycp

Change the following in language_de_CH.ycp:

{
textdomain “languages_db”;

return
$
    // 1. information for language selection:
    // Format is
    // <LANG-Code> : 
    //      <Language-to-display-UTF8-coded>,
    //      <Language-to-display-ASCII-coded-if-needed>,
    //      <LANG modifier used when UTF-8 enconding is selected>
    //      <LANG modifier used when no UTF-8 enconding is selected>
    //      <translated Language-to-display-UTF8-coded> ]
    //
    "*de_CH*" : 
                "Deutsch",
                "Deutsch",
                ".UTF-8",
                "@euro",
                // language name
                _("German")
    ],
    // 2. what time zone propose for this language
    "timezone"      : "*Europe/Zurich*",
    // 3. which keyboard layout propose for this language
    "keyboard"      : "*german-ch*",
];

}

After this, I could set de_CH in YaST2. However, in KDE Systemsettings, Swiss German is not directly selectable. I can select German and then set Region to Switzerland. If I logout/in and open a system terminal, all the menus are still in English.
3] Is there more to it?
4] If, what?

Any help greatly appreciated

Greez
chris

There is a fine thread: How do I set locale - Applications - openSUSE Forums Feel free to browse thoroughly.

Karl,
thanks, I read that thread. I’ll reread it. I’ll report back afterwards.
Greez
Chris

Karl

Thanks again for the hint. No sleep for the time being, so some time to spend on this

https://forums.opensuse.org/showthread.php/526766-How-do-I-set-locale?p=2837041#post2837041
suggests, I need to install glibc-i18ndata. However, as shown in my OP, “de_CH” exists. What is missing is the file “language_de_CH.ycp”. If I copy it from “language_de_DE.ycp” with the mentioned adjustments, I can select de_CH. One of my points (or maybe THE point) is, that “language_de_CH.ycp” is missing. I do not see, how “localedef” could create that file.

And then, I am not sure, if my “adjustments” (hacking rather I guess) in “language_de_CH.ycp” do all the trick. I have a strong feeling, my hacks are not complete. Also, I guess others would really prefer those “language_de_XX.ycp” files would be available. I am postive that this was the case in 42.1 at least, not 100% sure it was in 42.3.

Any thoughts? Should I place a request at https://features.opensuse.org/?

greez
chris

if it worked in 42.3 and stopped working in 15 it is not missing feature, it is bug (regression). You should open bug report.

When creating a new en_DE locale on my machine I never worried about some “language_en_DE.ycp”. You may verify:


erlangen:~ # rpm -qf /usr/share/i18n/locales/de_CH 
glibc-i18ndata-2.27-6.1.noarch
erlangen:~ # 

Then try: localedef -f UTF-8 -i de_CH de_CH.UTF-8

Make sure:

erlangen:~ # grep -C 3 LANG ~charlemagne/.config/plasma-localerc
[Formats]
LANG=de_CH.UTF-8

[Translations]
LANGUAGE=
erlangen:~ # 

That is what works on my boxes.

Hi all
@arvidjaar
I am 100% sure about 42.1, as I would be in tax declaration (Consider me a 100% honest guy and that’s what I am.), not though 100% sure on 42.3. Why? I wrote a documentation for 42.1 which included screen shots for the very problem. That documentation unfortunately never got updated to 42.3. But still: Missing all these “language_de_XX.ycp” looks to me at leats like like a flaw. I’ll report it as a bug - see below.

@Karl
I will setup a spare box and try to verify your sugestion. Honestly, I doubt it will bring a valid “language_de_CH.ycp”.I do however expect your suggestion to solve the problem. I am afraid. I won’t be able to do this before Jan. 8 2019. Hope you bare with me until then.

Happy new Year and
Guetä Rutsch

chris

Checked my box again and found:

  • System default is defined as RC_LANG=“de_DE.UTF-8” in /etc/sysconfig/language. You may have de_CH.UTF-8 without further tinkering.
  • Users System Settings > Regional Settings > Language
    is empty, but Format defaults to “de_DE.UTF-8”. You may select one from several hundred(!) items, even Schwiiz Schwiizertüütsch (gsw_CH).

I do however expect your suggestion to solve the problem. I am afraid. I won’t be able to do this before Jan. 8 2019. Hope you bare with me until then.
Happy new Year and Guetä Rutsch
You are welcome. Happy new year to you!

This problem still exists in Leap 15.3

Thanks to the information in this thread, I was able to set up a clean solution.

I copied the file “language_de_DE.ycp” to “language_de_CH.ycp” and made the following changes (in red);


/**

  • This file contains the description of the language needed by yast2-country

  • module.

  • Translation of the ‘language name’ to actual YaST language be must applied

  • each time this file is invoked.

  • If you want to add new language to YaST using a file of this type provided

  • by some module different from yast2-country (e.g. in some Add-On Product),

  • consider using special textdomain, so it is possible to provide also

  • translations of the ‘language name’ string to all installed languages.

  • Author: Jiří Suchomel <jsuchome@suse.cz>

  • $Id$
    */
    {
    textdomain “languages_db”;

    return
    $
    // 1. information for language selection:
    // Format is
    // <LANG-Code> :
    // <Language-to-display-UTF8-coded>,
    // <Language-to-display-ASCII-coded-if-needed>,
    // <LANG modifier used when UTF-8 enconding is selected>
    // <LANG modifier used when no UTF-8 enconding is selected>
    // <translated Language-to-display-UTF8-coded> ]
    //
    “de_CH” :
    “Deutsch (CH)”,
    “Deutsch (CH)”,
    “.UTF-8”,
    “”,
    // language name
    _(“German (CH)”)
    ],
    // 2. what time zone propose for this language
    “timezone” : “Europe/Zurich”,
    // 3. which keyboard layout propose for this language
    “keyboard” : “german-ch”,
    ];
    }


YaST System Language: set the primary language to “German (CH)”
Installing the de_CH spelling checker (was automatically done)
Restart
locale shows now a clean de_CH setup (before it was a mix of de_DE and de_CH).

> locale
LANG=de_CH.UTF-8
LC_CTYPE=“de_CH.UTF-8”
LC_NUMERIC=de_CH.UTF-8
LC_TIME=de_CH.UTF-8
LC_COLLATE=“de_CH.UTF-8”
LC_MONETARY=de_CH.UTF-8
LC_MESSAGES=“de_CH.UTF-8”
LC_PAPER=de_CH.UTF-8
LC_NAME=“de_CH.UTF-8”
LC_ADDRESS=“de_CH.UTF-8”
LC_TELEPHONE=“de_CH.UTF-8”
LC_MEASUREMENT=de_CH.UTF-8
LC_IDENTIFICATION=“de_CH.UTF-8”
LC_ALL=

The new setting can be selected in evolution without problems.
If the problem in 15.4 still exists, that’s a relative simple solution.

Have a nice day
Walter