]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/plugin.php
Add a $config['plugins']['locale_path'] which can be set to override the individual...
[quix0rs-gnu-social.git] / lib / plugin.php
index ee57f590435f8a2093d066247ade5b634e72f82f..3f84afa27e867a2c3c950a2ded5d1ae46cde44d7 100644 (file)
@@ -88,7 +88,12 @@ class Plugin
         $class = get_class($this);
         if (substr($class, -6) == 'Plugin') {
             $name = substr($class, 0, -6);
-            $path = INSTALLDIR . "/plugins/$name/locale";
+            $path = common_config('plugins', 'locale_path');
+            if (!$path) {
+                // @fixme this will fail for things installed in local/plugins
+                // ... but then so will web links so far.
+                $path = INSTALLDIR . "/plugins/$name/locale";
+            }
             if (file_exists($path) && is_dir($path)) {
                 bindtextdomain($name, $path);
                 bind_textdomain_codeset($name, 'UTF-8');