"error/There are no words" in Hangman

"error/There are no words" in Hangman

by Stefan Oertel -
Number of replies: 4

Hi Vasilis, thank you for this very nice plugin - our pupils love it smile

But in german the hangman game has problems with german umlauts. I created a glossary with the following words (in brackets for you the English word):

Erdöl (petroleum), grün (green), März (March), Straße (street), Übung (exercise)

If I create a hangman game basing on this glossary and try it to start, it gives me the error "There are no words". The letters ä, Ä, ö, Ö, ü, Ü and ß are the cause, but often used in german words sad If I add another word to the glossary without one of these letters, everything is fine but the game uses only this word. A possible solution could be (standard solution in the german version of hangman) to replace these letters by two letters:

Ü, ü => UE (=> GRUEN, UEBUNG)

Ö, ö => OE (=> ERDOEL)

Ä, ä => AE (=> MAERZ)

ß => SS (=> STRASSE)

What do you think, is it possible? 

Thanks, Stefan

Average of ratings: -
In reply to Stefan Oertel

Re: "error/There are no words" in Hangman

by Vasilis Daloukas -
Picture of Particularly helpful Moodlers Picture of Plugin developers

Tha alphabet for German language in the hangman is

$string['lettersall'] = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';

All the alphabet is shown in the bottom.

Do yoy mean that the correct alphabet is

$string['lettersall'] = 'ABCDEFGHIJKLMNOPQRSTUVWXYZÜÖÄß';

???

In reply to Vasilis Daloukas

Re: "error/There are no words" in Hangman

by Stefan Oertel -

Hi Vasilis,

yes, a typical German word can consist of 30 different letters. Look here http://de.wikipedia.org/wiki/Deutsches_Alphabet and here http://en.wikipedia.org/wiki/German_alphabet. (AB...XYZ and ÄÖÜß)

The easiest way would be to customize the "lettersall" parameter in the language file, but it only works for the ß (the letter is shown now at the bottom and the game works with the word "Straße"). The other three Ö, Ü, Ä are ignored and words with these letters too. I don't know why. Any idea? Is the order important (...XYZÜÖÄß or ...XYZßÄÖÜ or ...)?

Does the adaptation of the "lettersall" parameter affect any other game?

Thanks, Stefan


In reply to Vasilis Daloukas

Re: "error/There are no words" in Hangman

by Stefan Oertel -

Hi Vasilis,

the problem was the language text caching mechanism.

If I disable the option "Cache all language strings (langstringcache)" and edit the language file game.php in the moodledata directory (parameter letterall to 'AÄBCDEFGHIJKLMNOÖPQRSTUÜVWXYZß'), everything is fine:

Game hangman with German umlauts

After that I can enable the text caching again. Do I have to do this with every update? Does the adaptation of the "lettersall" parameter affect any other game?

Thanks again and σας ευχαριστώ, Stefan

In reply to Stefan Oertel

Re: "error/There are no words" in Hangman

by Stefan Oertel -

Hi Vasilis, 

I've checked all the other games and there are no problems after changing the lettersall parameter to AÄBCDEFGHIJKLMNOÖPQRSTUÜVWXYZß in the German language file. But I found another problem in the game crossword (not the same reason => another post).

Ralf Krause, the German translator, has changed the parameter in the official German language file. Therefore there will be no problems with future updates.

Thanks again, Stefan