diff --git a/lib/l10n.php b/lib/l10n.php
index b21829e91fddd6c8e9f4e0356c90f4d3e6db1139..de8514573d393a68db014dfdd7a4694f9f4e169c 100644
--- a/lib/l10n.php
+++ b/lib/l10n.php
@@ -113,13 +113,13 @@ class OC_L10N{
 			$i18ndir = self::findI18nDir($app);
 			// Localization is in /l10n, Texts are in $i18ndir
 			// (Just no need to define date/time format etc. twice)
-			if(file_exists($i18ndir.$lang.'.php')){
+			if((OC_Helper::issubdirectory($i18ndir.$lang.'.php', OC_App::getAppPath($app).'/l10n/') || OC_Helper::issubdirectory($i18ndir.$lang.'.php', OC::$SERVERROOT.'/core/l10n/') || OC_Helper::issubdirectory($i18ndir.$lang.'.php', OC::$SERVERROOT.'/settings')) && file_exists($i18ndir.$lang.'.php')) {
 				// Include the file, save the data from $CONFIG
 				include(strip_tags($i18ndir).strip_tags($lang).'.php');
 				if(isset($TRANSLATIONS) && is_array($TRANSLATIONS)){
 					$this->translations = $TRANSLATIONS;
 				}
-			}
+			} 
 
 			if(file_exists(OC::$SERVERROOT.'/core/l10n/l10n-'.$lang.'.php')){
 				// Include the file, save the data from $CONFIG