Idea for language files

  1. 5 years ago

    Hello community! Hello @Toby!

    What about creating a folder "languages" within any plugin containing the language file for this specific plugin.

    I think, that this would complete the idea of an independent core and separate addons.

    What are your thoughts?

  2. \www\core\lib\ET.class.php

    ::302

    	// Loop through the loaded plugins and include their definition files, if they exist.
    //	foreach (C("esoTalk.enabledPlugins") as $plugin) {
    //		if (file_exists($file = "$languagePath/definitions.".sanitizeFileName($plugin).".php"))
    //			self::loadDefinitions($file);
    //	}
    	foreach (C("esoTalk.enabledPlugins") as $plugin) {
    		$languagePluginPath = PATH_PLUGINS."/".sanitizeFileName($plugin)."/languages/";
    		if (file_exists($file = "$languagePluginPath/".sanitizeFileName(self::$language)."/definitions.php"))
    			self::loadDefinitions($file);
    	}
  3. Toby

    23 May 2014 Administrator

    I think this boils down to the question of whether plugin authors should be responsible for sourcing the translations for their own plugins, or whether translators should be responsible for including translations for various plugins.

    I firmly believe the latter is more correct. That is why language packs, in addition to their main definitions.php file, can contain translations specific to any number of plugins by including files called definitions.PluginName.php.

  4. @Toby I think this boils down to the question of whether plugin authors should be responsible for sourcing the translations for their own plugins, or whether translators should be responsible for including translations for various plugins.

    I firmly believe the latter is more correct. That is why language packs, in addition to their main definitions.php file, can contain translations specific to any number of plugins by including files called definitions.PluginName.php.

    I agree with Toby.

  5. hmm... but translators could add their translation file to the repository of the corresponding plugin instead of creating combined language packs in a different repository. so a forum administrator wouldn't have to collect pieces from lots of different locations.

 

or Sign Up to reply!