Glossary Module and Japanese

Glossary Module and Japanese

by Jeff Mehring -
Number of replies: 15
I am trying to use the glossary module to show both the English word and definition along with the definition in Japanese. Is this possible? All I keep getting is the English word and definition and question marks (????) in place of the Japanese definition.
Average of ratings: -
In reply to Jeff Mehring

Re: Glossary Module and Japanese

by Frank Ralf -
Hi Jeff,

That should be possible. It's probably an encoding problem. All Moodle content should be encoded as UTF-8. Might be only your browser having problems with that, please try that first.

Then you should look in the database (glossary_entries table) whether the Japanese is stored there correctly (using phpMyAdmin http://www.phpmyadmin.net or a similar tool), see screenshot.

hth
Frank
Attachment moodle_jap_glossary_entries.png
Average of ratings: Useful (1)
In reply to Frank Ralf

Re: Glossary Module and Japanese

by Jeff Mehring -
Hi Frank,

Thanks for your input. I know my browser will allow Japanese since I can view websites in Japanese.

So that means it must be a database issue. To find (glossary_entries table) where would I look? Is using phpMyAdmin the only way to look at the database? I am not real skilled at looking at the inner workings of a Moodle so detailed steps work best for me.

Finally, if I enforce English as the language in my Moodle, would that affect this? I have loaded Japanese onto my Moodle as well, and allowed students to choose either English or Japanese, but it did not fix my glossary problem.

Thanks again for the help,
Jeff

In reply to Jeff Mehring

Re: Glossary Module and Japanese

by Frank Ralf -
Hi Jeff,

Where exactly does your Japanese get broken?

* When you enter terms in the glossary the first time?
* After saving?
* When editing existing glossary terms?
* Only when viewing/using the glossary as a student?
* Do you have problems with Japanese in other parts of your Moodle installation as well?

That would help isolating the problem.

The language setting shouldn't affect the display of Japanese. I can switch languages without any problem in this regard.

Have you set "Language autodetect" under "Language settings"? And have you checked, whether your browser really uses the correct encoding when you view a glossary (View > Encoding)?

Could you post a screenshot? Just hit the "Print Scrn" key on your keyboard to create one.

And which versions of Moodle, PHP and MySQL are you using? Look under Server > Environment.


hth
Frank


In reply to Frank Ralf

Re: Glossary Module and Japanese

by Jeff Mehring -
Hi Frank,

I was playing around with my Moodle and the phpAdmin and I was able to find the language settings you mentioned in your first email. I changed them to Japanese and it seems to have worked. I can view both Japanese and English words in the definition. I haven't tested it yet with more than one word, so that is my next job. But, when I looked on my Moodle site and found the highlighted word, clicked on it to bring up the definition, it did show the definition in both English and Japanese, so I think it works.

Thanks for you help, I'll save your emails and if I have further problems I'll let you know.

Thanks for everything!
Jeff

In reply to Jeff Mehring

Re: Glossary Module and Japanese

by Frank Ralf -
Hi Jeff,

Glad I could be of help.

My browser tells me that your site still uses PHP 4.4.7 which is rather outdated. Might be that your hosting provider also uses an old version of MySQL. MySQL uses UTF-8 as standard encoding only from version 4.1.2.

Cheers,
Frank
In reply to Frank Ralf

Re: Glossary Module and Japanese

by Jeff Mehring -
Hi Frank,

I'll look into changing my PHP. I'll ask my hosting provider if they can update it.

I did have a question too. I am able to put a Japanese definition along with the words and I link the words so when they appear on my site the student can check the word's definition. The first time I check the words definition, it comes up just how I want it, English word, Japanese and English definition, BUT if I check the word again, either the same word or the same word but in a different location on my moodle site, it shows ????? and the English definition. If I log out, and log back in, the first time it will show me the word correctly and the second time it will not. What should I be looking at in my phpAdmin to fix this? I don't know understand why it works once, but not a second, third or more times unless I log out and log back in.

Thanks,
Jeff

In reply to Jeff Mehring

Re: Glossary Module and Japanese

by Frank Ralf -
Hi Jeff,

looks a bit complicated. Could you create an account for me so I can test it on your live server?

And please look in the Site Administration Block under "Server > Environment" which versions of Moodle, PHP and MySQL you are using.

And you should ensure that you use UTF-8 as standard encoding throughout your web site.

tia
Frank
In reply to Frank Ralf

Re: Glossary Module and Japanese

by Jeff Mehring -
Hi Frank,

I set up an account for you

Username: frank
PW: 123

I was working on the site some today and found out that I do not need to log out and back in to have the glossary reset. If I wait a minute or two it will reset itself, so I don't know if it is an internal check Moodle runs or what, but when I'd click on the word, then click on the same word again later in the sentence, it would not work on the second word. If I waited a minute or two, then clicked on the second word, it worked. I think it is just an internal Moodle thing. I was looking at the words, "the" and "of" since those are the only 2 I have set up right now.

I did check with my server and I am running PHP 5.2.5. I don't know why it says PHP 4.4.7 on my Moodle. MySQL is 5.0.45 and that is listed on my Moodle site. I did set standard encoding to UTF-8. That really helped when you told me.

Thanks and let me know if you find anything.
Jeff

In reply to Jeff Mehring

Re: Glossary Module and Japanese

by Frank Ralf -
Hi Jeff,

Thank, your glossary is working now even without logging in. I could reproduce your error. I suppose it has something to do with the web server somehow sending false encoding information to the browser. Will have a closer look.

But what the heck is this stuff doing in your glossary???
http://cmweb.caed.calpoly.edu/moodle/?q=ambien

Frank
In reply to Frank Ralf

Re: Glossary Module and Japanese

by Jeff Mehring -
Hi Frank,

I do not know why that ambien stuff is in my glossary. Where did you find it? I know I had someone place spam on my site, but that got cleared up. You can remove that ambien junk but let me know how you found it so I can keep an eye out for it.

Jeff

In reply to Jeff Mehring

Re: Glossary Module and Japanese

by Frank Ralf -
You can see it when you use your browser's "Show source" function in one of the glossary windows. There's a whole list of URLs which are hidden by using CSS:

<i style="display:none">
xeex51
<a href=http://cmweb.caed.calpoly.edu/moodle/?q=ambien>ambien</a>
...

Might be inserted by cross-site scripting (http://en.wikipedia.org/wiki/Cross-site_scripting).

Frank
In reply to Frank Ralf

Re: Glossary Module and Japanese

by Frank Ralf -
A Google search for "moodle buy ambien" gets more than 332.000 hits: http://www.google.de/search?q=ambien+moodle+buy

The infection seems not to be related to the glossary as it manifests even on the main page (have a look at the source code).

You should have a look at Reducing spam in Moodle.

I created an issue in the Moodle Tracker: MDL-19122

Frank
In reply to Frank Ralf

Re: Glossary Module and Japanese

by Jeff Mehring -
Hi Frank,

Thanks. I saw them. Can I just delete the whole list without causing problems to my glossary? I do want to get rid of them. I tried to highlight them and delete them but that did not work.

Thanks again for the info on reducing spam. I do want to keep my Moodle spam free and safe.

Thanks again,
Jeff

In reply to Jeff Mehring

Re: Glossary Module and Japanese

by Frank Ralf -
Hi Jeff,

I fear you still have that spam problem. The source of your login page contains stuff like this:

<i style="none">
xeex511205
<a href="http://erasmus.redlands.edu/moodle/search.php?query=soma">soma</a>
<a href="http://erasmus.redlands.edu/moodle/search.php?query=buy+soma">buy soma</a>
...

If you got PhpMyAdmin installed you could search the Moodle database to see where it comes from.

Frank