I am exploring the use of lang packs and the multilang filter to allow users to select a resource based on their bandwidth (Instead of the system selecting it for them).
The process involves creating three lang packs, namely lo_band, mid_band, and hi_band. Then using the multilang filter, so that the user can just select one of these lang packs for their Low, mid or high bandwidth environment.
Each pack will only have the moodle.php in it with the following strings:
$string['thislanguage'] = 'Low Bandwidth';
$string['thischarset'] = 'UTF-8';
$string['locale'] = 'en.UTF-8';
$string['parentlanguage'] = 'en_utf8';
I created an en_utf8_local first and tried to rename that in the moodledata/lang folder but it seems that Moodle no longer scans the lang folder. The moodledata/lang/lo_band language does not appear in the dropdown boxes for selecting the language. Even when I turned off language caching.
I tested this in local installation of moodle in an Ubuntu 8.10 pc. The version installation is Moodle 1.9.4+ (Build: 20090204).
I know I should be creating a filter for this purpose but I don't have enough programming skills for such. Can anyone please help me find out why lo_band will not appear in the language dropdown box?
Not sure about your problem, but try adding _utf8 to your new lang folder names, and make sure you don't have a 'langlist' defined in the admin menus.
With language.php included, the language shows up in the list of languages.
Here is my blog report on a test of this hack: http://paaralan.blogspot.com/2009/08/hack-bandwidth-adaptivity-for-moodle.html
If any moodler has any suggestion to improve it, I would really appreciate it.
At any rate I have put in a link to your invitingly clear blogpost in the Moodle Docs for the multilang filter: http://docs.moodle.org/en/Multi_language_content#Tips_and_tricks
One thought I had: There is a [Lang[V]] dropdown in the HTML editor (at least in later Moodle versions) which can be used for marking up multilang content. Unfortunately that isn't documented in the docs yet. Is there a way to get your tags into that list? (Maybe they turn up automatically, though I doubt it.) I expect that there can be a problem with "long" langs like loband when the others are two letter abbreviations, like en, maybe it would be good to have some 2 character abbreviations like: b1 b2 b3 that wouldn't conflict with other languages. (I don't even know it you hack can coexist with other languages, but that would perhaps make a future multilang/bandwidth filter more easily backwards compatible.)
With regards to the lang dropdown in html, I never paid attention to it before. And I've been hand coding all all this time. I thought that list changed the html editor interface . They would probably turn up automatically because as I type this I see Multi and pt-br in the list. I'll check it out in my local pc installation of Moodle 2.0 and 1.9 and report back to the forum.
In order for the hack to work with other languages, it will require something like loband-tl for tagalog. That would be a separate lang pack. This hack is useful only if a moodle site has one parent language. If the parent language is french then the language.php and moodle.php settings would have to be changed (i.e. just copy from the french lang pack). I don't think it would be a good idea to write a php code to change the lang strings themselves. Perhaps for multilanguage sites a real filter is the best way to go.
But when I think about it, who would have the time and resources to create 3 version for more than 3 languages? Perhaps an auto translator will be needed with natural language processing capability to automate such a task.
I tried to add loband => "Low Bandwidth"; to the languages.php list but it resulted in the html editor disappearing in favor of the text editor. So its not as simple as that.
Perhaps the developers who integrated the html editor can inform us how to add a language in that list. Or better yet, make the Lang dropdown box's data scan the installed languages in the system rather than relying on a static list.
I wonder where I should suggest this?
Assuming you don't need Afar, Abkhazian or Avestan (I don't even know where they are spoken ) :
What happens if you add
ae=>"the high road"
When scrolling down to Swedish, I think I have often felt it was easier to chose "aa" and change it by hand. (It is also possible to hit [S] 4 times until "se" is marked.) So I would also vote for a simple way to only include the langs being used.