Language import utility broken

Language import utility broken

by Olli Savolainen -
Number of replies: 25
I was using a moodle 1.6 beta downloaded last week, and it had this problem. Today I installed a fresh install (no upgrade, deleted the beta first) of 1.6+ stable. Installation was ok (though I didn't understand the part of the installation where it says you can now install new language packs but doesn't offer me the means to do it).  The problem seems to not have gone away in stable. Tried to search for others having this problem but can't find. Using Linux 2.6, Apache, PHP, MySQL. After the installation:
  1. Open language import utility
  2. Select 'Deutsch' (or any other as far as I've tested) from Available language packs. Click "<-- Install selected language pack"
  3. "Language pack de_utf8 was successfully installed"
  4. The selected language disappears from the Available language packs but does not appear in Installed language packs or in Change site language menu or afaik, anywhere else.
Thoughts? Thanks.
-Olli


Average of ratings: -
In reply to Olli Savolainen

Re: Language import utility broken

by Olli Savolainen -
In moodle dir:

> ls lang
README.txt  en  en_utf8

so it seems that it doesn't install anything though it thinks it does.
In reply to Olli Savolainen

Re: Language import utility broken

by Yu Zhang -
Hi,

The new language packs will be installed in dataroot/lang not moodle dir. Also you can try to drop the lang cache, and check your admin lang list.

Cheers,

Yu
In reply to Yu Zhang

Re: Language import utility broken

by Olli Savolainen -
mymoodle > Administration > Configuration > Language
in the list there's only english

moodledata/lang indeed has directories packed with the languages I tried:
de_du_utf8  de_utf8  fi_utf8  gl_utf8

How do I drop the lang cache? couldn't find it in moodledata, db or moodle ui?

Thanks for the quick help.
In reply to Olli Savolainen

Re: Language import utility broken

by Helen Foster -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators
Hi Olli,

Please check the Interface section in Administration >> Configuration >> Variables for the option to disable langcache.
In reply to Helen Foster

Re: Language import utility broken

by Olli Savolainen -
Did that, thanks. smile Still only english in all the menus, though.
In reply to Olli Savolainen

Re: Language import utility broken

by Francis Brouns -
Hi,

we are having similar problems. I need to install Moodle on a Windows 2003 server. The language import function always returns DNS errors, server not found and a blanc page is shown. So, I manually downloaded the Dutch UTF8 language pack and added that to moodledata/lang. However, I can not change to the Dutch language, because only the English language is listed. This is throughout the site.

On another machine, the language import function, returns the screen that allow to select language packs. I selected Nederlands and clicked 'Install selected language packs'. The language pack is downloaded and added to my moodledata directory. However, Nederlands does not appear in the 'Installed language packs' list and has disappeared from the 'Available language packs' list.
The Dutch language is not available and can not be selected.

How can I make the downloaded language available throughout the site?

Both are fresh install of Moodle 1.6 stable (downloaded last week).

Francis
In reply to Francis Brouns

Re: Language import utility broken

by Andreas Kalt -
Any progress on this yet?

I've even uploaded the German language pack manually but can find no way of activating it. It doesn't show up in the dropdown menu and I have no way of re-selecting it in the import utility.

Any hints are highly appreciated.
In reply to Francis Brouns

Re: Language import utility broken

by koen roggemans -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Translators
Sorry if I'm asking the obvious, but have you unzipped the language pack in that folder?
In reply to koen roggemans

Re: Language import utility broken

by Francis Brouns -
No problem for asking. Yes, the language pack has been unzipped. The problem occurs on 2 different machines. On the XP machine the language can be downloaded via the Admin Language Download tool. This tool places the language pack into the moodledata directory.

On the Windows 2003 server, the language download tool does not function. So I manually downloaded and extracted the zip file into the moodledata directory.

Both servers are running the same Moodle 1.6 stable version.

Yesterday I downloaded and installed the Moodle 1.6 release. The language-pack download functionality still does not work. However the language pack (copied from the site that is not working) now can be selected. There is one other difference in the installation. This time I created the database with default character set utf8 and collate utf8_unicode_ci and did not need to run the UTF8 migration tool.

Francis
In reply to koen roggemans

Re: Language import utility broken

by Daniele Cordella -
Picture of Core developers Picture of Plugin developers
I do find the same problem on an upgrade from 1.5.3+ to 1.6+
I added the language pack manually but it still doesn't appear in the list on the left and Moodle "doesn't know" the language pack is installed. Nowhere it is present.
It is a problem.
Attached is what I get if I try to add a language pack through Moodle.
Attachment error.gif
In reply to koen roggemans

Re: Language import utility broken

by Daniele Cordella -
Picture of Core developers Picture of Plugin developers
If I set langCache to "no" I get this list of errors.
Attachment error2.gif
In reply to Daniele Cordella

Re: Language import utility broken

by Francis Brouns -
Hi,

this indicates that Moodle/Apache has no access to the files in the moodledata lang directory. Did you check whether the files are created in the moodledata directory?

When you manually unpacked the language files into the moodledata directory, did you remember to change the ownership of the directory and all files to the Apache user?

Francis

In reply to Francis Brouns

Re: Language import utility broken

by Helen Foster -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators
Hi,

For anyone still having problems with the language import utility, please see Petr's checklist in bug 6003.
In reply to Helen Foster

Re: Language import utility broken

by Daniele Cordella -
Picture of Core developers Picture of Plugin developers
Thank you Helen. As always your contribution is correct and in time.
Sorry if I didn't post it before.
I was supposed, in conscience, to do it. wink
In reply to Helen Foster

Re: Language import utility broken

by Francis Brouns -
This only seems to refer to the Language Import Utility not working at all. However, one on of my machines, the Language Import Utility correctly downloaded and unzipped the Dutch language pack, but the language is not available in Moodle.

Also after manually downloading and installing the language pack on the server that does render DNS errors for the Language Import Utility, the language is not available.

From the server I can access the Moodle.org site using a browser.
As a new database was created, Moodle did not report that Unicode conversion was necessary.

allow_url_fopen = On

Access rights seem to be fine. On the first server (Windows XP), Moodle creates the lang directory. On the other server (Windows 2003) where the language pack has been extracted manually, the access rights seems to be the same as for the other directories in moodledata and moodle has created the corresponding folders for users, temp, sessions, courses etc.

It is no problem when I need to download and extract the Dutch language manually, but I need to be able to set the Dutch language as default language for the site. At the moment this is not possible, because only English is listed.

I'll be replacing Apache 1.3 with Apache 2 in the near future, because Apache keeps on crashing after the conversion to UTF8. Maybe both factors are linked?

Any help is appreciated.

Regards,

Francis
In reply to Helen Foster

Re: Language import utility broken

by Olli Savolainen -
Hi Helen,

Even moving the language directories from /moodledata/lang to /moodle/lang doesn't change anything.

The solution described at the bug tracker doesn't help, I guess. I have a fresh  moodle so all the unicode should be ok already, right?

Also, advice 2-4 doesn't seem to apply, since as I install a new language, the moodledata/lang/ gets a new directory filled with files:

> ls lang/fi_utf8/
README                       docs                 langconfig.php
activitynames.php            editor.php           lesson.php
admin.php                    emailprotect.php     mediaplugin.php
algebra.php                  enrol_authorize.php  message.php
appointment.php              enrol_database.php   moodle.php
assignment.php               enrol_flatfile.php   multilang.php
attendance.php               enrol_internal.php   pgassignment.php
auth.php                     enrol_ldap.php       pix.php
block_course_list.php        enrol_paypal.php     questionnaire.php
block_course_summary.php     error.php            quiz.php
block_online_users.php       exercise.php         quiz_analysis.php
block_search_forums.php      fi_utf8.md5          resource.php
block_section_links.php      forum.php            scorm.php
block_social_activities.php  glossary.php         survey.php
calendar.php                 grades.php           tex.php
censor.php                   help                 timezones.php
chat.php                     hotpot.php           webquest.php
choice.php                   install.php          wiki.php
countries.php                journal.php          workshop.php
dialogue.php                 label.php
>
In reply to Olli Savolainen

Re: Language import utility broken

by Helen Foster -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators
Hi Ollie,

If your problem remains unresolved, then please consider re-opening bug 6003 and adding a detailed report.

Hmm, it seems there is another language import utility bug - bug 6039. thoughtful
In reply to Helen Foster

Re: Language import utility broken

by N Hansen -
All of these "solutions" assume that we have converted our database already. Since my first attempt at conversion screwed up my already existing unicode data I reverted back to the "non-unicode" version. In the meantime, all my language menus are broken as described by others-nothing shows up, and I can't import language packs. Now, I can live with the broken language menus by going in and changing the languages directly in the database but I can't live with my crucial course and student data being transformed into question marks, so converting to unicode at this point is not an option for me. So what am I supposed to do? I do believe there is a critical bug in Moodle with regards to how already existing unicode data is being handled by the "upgrade" to unicode and I filed a bug some weeks ago with what seems to me to be some helpful information about what might be wrong with the conversion process but have gotten no response to it (it's bug 6161). 
In reply to Helen Foster

Re: Language import utility broken

by Olli Savolainen -
for me this already got fixed, just to let you know. can't remember whether it was a new sub-version of moodle 1.6 that did it.
In reply to Francis Brouns

Re: Language import utility broken

by Daniele Cordella -
Picture of Core developers Picture of Plugin developers
Thank you Francis.
I looked for the solution trying all and at the and I got the solution (6 hours ago) by deleting the lang folder and importing the language pack again.
Thank you in any case.
In reply to Daniele Cordella

Re: Language import utility broken

by Francis Brouns -
Hi,

I tried that before without result. Today I tried again, but download the language pack again (manually).

I also moved the moodledata directory inside the Apache htdocs.

Although the language import utility still does not function on the server, I now can choose the Dutch language.

It even seems to work after I moved the moodledata directory out Apache htdocs to its original location.

Usually I create the moodledata directory myself. This time I used install.php and had Moodle create the directory. This added a .htaccess file with deny from all. Maybe this caused some of the problems?

Cheers,

Francis

In reply to Francis Brouns

Re: Language import utility broken

by Cleber Souza -
The answer is on the Francis' answer.

For the moodle show the languages you must change your php.ini setting allow_url_fopen to On. (default is Off on almost systems I think) and reload/restart your webserver.
After this all the languages are showed perfectly.
As "allow_url_fopen = On" imposes a security risk, the Moodle developers team could think about change this update method.

Thanks.
In reply to Cleber Souza

Re: Language import utility broken

by Maite Goñi -

Hi!

I'm having the same problem with the languages pack but the biggest problem is that I'm new at this and I don't control anything. So maybe it has no sense what I'm going to ask but here it goes:

You say:

For the moodle show the languages you must change your php.ini setting allow_url_fopen to On

The only thing I found similar to what you say is in install.php:

 /// check wwwroot
    if (ini_get('allow_url_fopen')) {
        if (($fh = @fopen($INSTALL['wwwrootform'].'/install.php', 'r')) === false) {
            $errormsg .= get_string('wwwrooterror', 'install').'<br />';
            $INSTALL['wwwrootform'] = $INSTALL['wwwroot'];
        }
    }
    if ($fh) fclose($fh);

Is here where I have to change something???

Thanks very much

Maite

In reply to Maite Goñi

Re: Language import utility broken

by Iñaki Arenaza -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
Maite, you have to edit your php.ini file (if you don't administer your web server, ask your admin to do it) and probably restart the web service (apache, iis, whatever).

Saludos. Iñaki.
In reply to Iñaki Arenaza

Re: Language import utility broken

by Maite Goñi -

Hi, Iñaki!

I'll try to do what you say ( I administer my web service but I'm really new at all this so i don't know much...). I'll try to do it and see if it works. Thank you very much.

Ondo izan eta laster arte.

Maite