Forums | Mahara Translation
Translations
/
Language pack structure
30 December 2008, 12:46
Hi. I have scratched some notes about lang pack structure - see http://wiki.mahara.org/Developer_Area/Language_pack_structure
Comments, bug fixes, typo fixes and ideas are warmly welcome :-)
31 December 2008, 0:17
Hi David,
The notes you have written are so far factually correct and free enough of typos that I didn't notice any . It doesn't explain why the language files are split up the way they are (so that third party plugins can provide their own translations without relying on strings in the core), which might lead people to believe things are different from moodle for no reason - but that's just a nitpick.
I think that page will be a good start towards a document explaining how to make a translation for Mahara. Such a page/series of pages would include more information like how to do the translating (setting up langconfig, setting the site language to your new language, the actual job of translating the strings), how to use your adminlang branch and how to get the translation upstream if that's what the author desired.
If that sounds good to you, then we could start a new page in the developer area called 'language packs' to store all this information, and move your page under that.
Thanks for making the page!
31 December 2008, 7:20
> we could start a new page in the developer area called 'language packs' to store all this information, and move your page under that.
Yep - sounds good for me. I just tried to do it but found myself unable to move the page. Can you do it for me pls?
31 December 2008, 12:47
Hello and Happy New Year!
I have had a look to the page "Languages Packages Structure" and the suggestions about how to add new translation string files. I personally prefer the second option, because I think it is more consistent and we keep the standard distribution code separate from the translations, like in Moodle.
The information provided in the page "Installing Mahara, Optional other language instalations" has become obsolete (it only advices to extract the language packages in the Mahara directory, which is not very precise), so I think it is better to remove it from there and to refer to the "Language Packages" page.
Regards
01 January 2009, 8:11
Hi Aaricia,
Happy new year to you too!
I made the changes to the wiki pages, as you suggested. Like you, I find the 2nd way of storing the lang files much better and consistent. IMHO, it should be the default way to install the lang packs in Mahara. I don't now though what is the pros and cons in terms of performance of this way.
PS. As the doc is a wiki, you can make any changes that you want yourself.
Ciao!
04 January 2009, 6:18
Having a look at the code, the only performance penalty of having the lang packs in the dataroot directory is that Mahara searches those lang packs after trying the standard paths (inside docroot) first, so it hits the disks at least twice.
This shouldn't be a big problem with Linux (or any other Unix-linux o.s.) but I've heard in the past that Windows has (had?) poor stat()/fstat() performance (the system call used to check for the presence of a given file).
Saludos. Iñaki.
04 January 2009, 18:58
I am thinking - maybe what we should do is set langpacksearchpaths to look in the dataroot by default, and tell people to install language packs in there. If people begin to have performance problems - and they probably won't on most sites - they can use the 'trick' of moving the language files in along side the English ones. That will keep the install instructions simple, because we don't need to tell them about the 'trick' on the Installing Mahara page.
What do people think about that idea?
05 January 2009, 5:03
I would very welcome this idea. This would be much easier for the installation of language packs.05 January 2009, 6:43
> What do people think about that idea?
Yes, I like your idea, too. This is the smart way to install Mahara language packs.
05 January 2009, 16:46
And what if we modify language_get_searchpaths() to put docroot at the end of the list of locations to search? For English speaking Mahara sites there is no difference as the list has got just one item - the docroot. For sites with langpacksearchpaths set we may expect they want some non-English language to be used. Then there should be no performance issue at all. If langpacksearchpaths is correctly set, the first disk touch should find the lang file.- «Previous page
- 1
- 2
- 4
- »Next page