Some thoughts...
It is clear that increasing the ease of installation of thirth party modules makes a clear view on translation locations impossible.
May be we should rethink one and other to recreate some transparency for both human and machine where translations can be found/installed/created. Here's my rethinking attempt:
There are core language files and thirth party module language files
There are distributed language files and locally created language files
and the combination: distributed thirth party module language files and locally created thirth party module files
What never should happen, is that locally created language files are overwritten by an upgrade.
What always should happen is that locally created language files have priority over distributed files.
Therefore I suggest to search for langstrings in
moodledata/lang/XX_utf8_local
moodledata/lang/XX_utf8
moodle/mod/modname/lang/XX_utf8
moodle/lang/en_utf8
moodle/mod/modname/lang/en_utf8
I suggest to write all translations by default in
moodledata/lang/XX_utf8_local
Translators who maintain a language pack can switch to the moodledata/lang/XX_utf8 folder
Translators who want to share their translations for thirth party modules can find their work in the local_XX folder and send it to the maintainer of the module, who can put it in the right place for redistribution (like it should be done already).
I don't like the idea of saving localised lang files together with the thirth party module files: I don't like to make it necessary to give apache write access to a /public_html folder, especially since it is not necessary (we have the moodledata/lang folder). It also makes upgrades more difficult, since you cannot replace the whole Mooldescript (you have to search your modifications on language files first in a bunch of different /mod folders)
The only modification to the interface requires for this, is that it defaults to local_utf8 for translations and that it doesn't offer the opportunity to put non-standard module translations in /XX_utf8.
http://moodle.org/mod/forum/discuss.php?d=70451
by Tim Hunt - Tuesday, 1 May 2007, 05:19 PM
That is clearly a bug, and it needs to be fixed. The language editor needs to use the places_to_search_for_lang_strings() function from about line 4200 of lib/moodlelib, so it can look for language files in exactly the same place that get_string() and help.php look for them.