how to add language files for other plugins to a custom theme plugin?


i am building a theme for an elgg 1.8.8 installation and intend to place some custom english language files in the plugin for other existing plugins (such as thewire).

i have the file structure as follows:




however, the altered en file for thewire does not get picked up and used in the site. i've checked using the developer plugin that i am looking at the correct text tags in the browser... 
i've looked through the site documentation and at some forums and other plugins; so far i haven't seen this done anywhere.. i looked at jerome's dutch translation and added his line to register language files to the start.php file in my theme plugin, though that didn't do much either.





  • do you want to override or extend the existing plugins' language files' data ?

  • Overriding files of other plugins works only with the views directory. So this works:


    But the same does not automatically work with languages:


    The default languages file (myplugin/languages/en.php) of a plugin gets registered automatically so that doesn't need to be registered. The custom languages file "mytheme/languages/thewire/en.php" should work if you registered it with register_translations(). Are you sure that the path is correct? It should use the full path e.g:

    elgg_get_plugins_path() . "mytheme/languages/thewire/en.php".

    What is the order of thewire and your plugin in the plugin list? If two plugins have the same translation strings, the one with higher priority overrides the strings of the other plugin.

    Because of that you don't necessarily even need a separate file, but you can override strings of thewire by adding the same strings to the "mytheme/languages/en.php" file.

  • just copy paste the language string in your theme's language file..

    if you have en.php in ur theme then add the language string 'thewire:heading' =>'What ever it may be.',

    keep your theme at the end of the plugin list and run the upgrade thats all

    I have done this way to over ride the default regisration sucessfull message and login failed message...

    Also over riddedn the email validation mail text too..