Internationalization

Internationalization

by Steven Geggie -
Number of replies: 20

I'm interested in whether future version will be re-architected in a manner that will avoid the current "snapshot per language".  It seems like the code base is mostly dedicated to the various languages.

I'm just wondering if there was a more dynamic way to address this?

Average of ratings: -
In reply to Steven Geggie

Re: Internationalization

by Martin Dougiamas -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
I don't really understand what you mean by "snapshot per language" ... can you be a bit more specific?   Are you experiencing a problem?
In reply to Martin Dougiamas

Re: Internationalization

by Samuli Karevaara -
I'm not also sure of what the original poster meant, but maybe he was talking about /lang/ bloat.

I've also thought that there could be a "core" release with just an english lang pack, then either you could download the whole 50+odd languages, have separate downloads (as there is now, but no "core download" for the masses), or have a mechanism to online-install selected languages. Moodle 2.0 stuff maybe? This same online-install could be used for updating the language packs.

Current release version has over 8800 files, and of those something like 6600 are in the /lang/ folder. Maybe the original poster thought, based on the number of files, that something other than just the texts is replicated in those language packs.

CVS update is handy for a lot of stuff, but it's not for the masses, and not without it's problems.
In reply to Samuli Karevaara

Take language packs out of Moodle core release

by Jan Dierckx -
I fully agree with you, Samuli, I also think maybe some of the blocks and even modules could be made separate downloads. 
In reply to Jan Dierckx

Re: Take language packs out of Moodle core release

by Dan Marsden -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers Picture of Plugins guardians Picture of Testers Picture of Translators

I tend to disagree..... one of the great things about moodle is how easy it is to install - removing lang packs, blocks and modules makes installation more complex for those who need them - it also decreases the list of core features when comparisons are made to other LMS's - people might say something like "rss feeds can be added on a page using the RSS_block, but it's not in the core, so it's not really supported"

I do agree that balance is needed - we just have to trust MD to achieve and manage this.......

just a few thoughts....

smile

Dan

In reply to Dan Marsden

Re: Take language packs out of Moodle core release

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
I agree with Dan, altough I also strip a lot of languages and all themes from my update.
For new users it's pleasant that the installation runs in your own language, that you don't have to search for downloads to let Moodle give the possibilities/languages/themes you are looking for.
Once you get some expertise using Moodle, it's as simple as pushing the delete-button to remove the unwanted stuff out off your uploadpackage.
Now I regret already that some of my favorites, like the dialogue and the excercise modules, are NOT in the download smile
In reply to Dan Marsden

Re: Take language packs out of Moodle core release

by Samuli Karevaara -
There could naturally also be a full download to ease the installation. One thing that could help the developers to have a faster build/update/commit/etc cycle is to move the /lang/ folder to it's own CVS folder, like contrib is now? This might be a big change for all users with CVS write access, so maybe for Moodle 2.0?

I'm not very familiar with CVS, but there might be a special setup that checks out both the core and the languages to the core, so just a single update is needed to get all of Moodle.

With an online connection one approach might be that there is a small(er) download which asks for the installation language first, downloads that pack (quite small for individual languages), then asks for full / custom / minimal installation a'la windows programs, and then downloads the other required parts.
In reply to Samuli Karevaara

Re: Take language packs out of Moodle core release

by Martin Dougiamas -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
Talk of a Moodle Lite has gone around for a while ... removing anything will always upset someone, but I too would love there to be a mechanism to download just the core, and then have a web interface to download the rest.

The trouble is designing this to work in a way that doesn't cause a flood of problems across the very wide range of platforms that Moodle runs on. Moodle usually runs with very low permissions on the web server. We can download software into Moodledata (assuming PHP is compiled to support the downloading), but the PHP scripts can not be run from there unless we place Moodledata in the web directory, which is itself a security problem ... and so on.

It will also place a lot more load on moodle.org rather than sourceforge or fantastico, since there needs to be a proper repository of downloads that can support all those admins clicking "update".

Most importantly, developing it would involve a lot of work ... and in the scheme of things this feature (which only affects some admins) doesn't rank that highly against features that help all teachers and students ... 

I am very open to someone else working on this and coming up with a solid proposal.
In reply to Martin Dougiamas

Re: Take language packs out of Moodle core release

by Samuli Karevaara -
Martin, you are correct in that the "dynamic download" would be very problematic. It was 3:12 AM here so I was dreaming smile

But how about having two full installations: english only and international? This might reduce the server load.

In reply to Samuli Karevaara

Re: Take language packs out of Moodle core release

by Martin Dougiamas -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
Sure, I'll put some nolang versions on Sourceforge.

Now, let's wait for the US Moodlers say "oh, can you just include en_us because I hate the word enrolment", and the Spanish Moodlers say "there are so many of us, we should be included in the lighter pack too" ... and ...  big grin
In reply to Martin Dougiamas

Re: Take language packs out of Moodle core release

by Samuli Karevaara -
Thanks, that was quick!

sf.net is maybe the right place for that now, so you don't get too many of those whin^m^m^m^m user comments that everybody loves. Maybe just randomize weird/wierd, center/centre and colour/color, s/z and be done with it smile


In reply to Martin Dougiamas

Re: Take language packs out of Moodle core release

by Dan Marsden -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers Picture of Plugins guardians Picture of Testers Picture of Translators

A lite version of Moodle is a great idea! - Who would be the main users of such a package? - my guess is developers (which makes good sense for it to be available via SF) - I would also hope that the US developers wouldn't be too worried about spelling with the trade-off having a smaller install package....

In reply to Dan Marsden

Re: Take language packs out of Moodle core release

by Martin Dougiamas -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
I don't know who the main users would be ... not developers because they use CVS anyway.
In reply to Martin Dougiamas

Re: Take language packs out of Moodle core release

by Ger Tielemans -

Before I login , Moodle already knows that I am from The Netherlands:
You could create a download page in Moodle that offers the core with only (en) and in a second line you offer me the Dutch language file.



(If I login from Belgium - during a holliday to eat witlof - you offer me Dutch and French... and German smile)
In reply to Ger Tielemans

Re: Take language packs out of Moodle core release

by Martin Dougiamas -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
At this point I need a language pack made up of rude words.  wink
In reply to Martin Dougiamas

Re: Take language packs out of Moodle core release

by Jan Dierckx -
Now I understand!
I recently had a look at some Mambo modules and they come in one zipped file which is unzipped and installed by the application itself. I was just wondering why we couldn't do the same... I hadn't thought of the security involved , the extra load on moodle.org etc...
In reply to Martin Dougiamas

Re: Take language packs out of Moodle core release

by Jurgis Pralgauskis -
as there is a web interface for language translating, might be there's no big deal to keep languages in php files smile. So if we keep lang's in DB, for example as longtext feelds, and then just eval them instead of including as files.

or maybe languages inclusion could be done by dynamically generating the archive to download. Let's say you have a core of archive, and may be it's possible just to include/add wished langpack without increasig server workload too much.
In reply to Jurgis Pralgauskis

Re: Take language packs out of Moodle core release

by Martin Dougiamas -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
Putting them in the database might be a good idea, though I'd first like to see some performance comparisons between this and the current method because a 20Mb database table is a pretty big thing to access multiple times per page. The programming would be easy, because only the "get_string" function needs to be modified.

Volunteer?
In reply to Martin Dougiamas

Re: Take language packs out of Moodle core release

by Martin Dougiamas -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
Actually, I was completely wrong about putting scripts in the data directory ... they work fine if they are included from another script (as the language files are).

To this end I've added basic support to 1.5 for language packs that are in $CFG->dataroot/lang ... in fact language packs found in this location will override any that are found in the main Moodle source tree.  I think the security aspects of this are adequately dealt with.

All we need now is an improved admin/lang.php script that can
  • edit files in this new location
  • download new language packs from moodle.org, overwrite or adding to existing ones
  • rename or delete language packs from this area, remembering to update all the user->lang and course->lang settings appropriately

And of course some extra donations to cover my bandwidth costs. smile
In reply to Martin Dougiamas

Re: Internationalization

by Steven Geggie -

Samuli has captured the essence of my comment.   I'm not experiencing any problems with Moodle.

It just seems to me that there are a great number of files and perhaps one could have fewer files (or a single XML file) per language for internationalization.  I know that there is a large body of work in this area for J2EE applications.....maybe some "best practices" can be leveraged.

I'm not criticizing, just asking a question that could help drive some streamlining in future releases.

In reply to Steven Geggie

Re: Internationalization

by Martin Dougiamas -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
The language packs contain just the strings for that language ... no other code. Yes, they are a significant proportion of the total package but in these days of cheap 100Gb hard drives and ADSL the 9Mb compressed size of Moodle is not really that significant, especially when upgrades are not that often.

Putting all the language files for a pack together in one file would be extremely detrimental to performance. Every access to the server by every person would have to load an entire language pack into memory (and then search it for every string).