Use findLanguage() instead of creating the object first
This commit is contained in:
parent
5fc004f8ea
commit
ed4c05c7b5
|
@ -396,8 +396,7 @@ class OC_Util {
|
|||
*/
|
||||
public static function addTranslations($application, $languageCode = null) {
|
||||
if (is_null($languageCode)) {
|
||||
$l = new \OC_L10N($application);
|
||||
$languageCode = $l->getLanguageCode($application);
|
||||
$languageCode = \OC_L10N::findLanguage($application);
|
||||
}
|
||||
if (!empty($application)) {
|
||||
$path = "$application/l10n/$languageCode";
|
||||
|
|
Loading…
Reference in New Issue