Use findLanguage() instead of creating the object first

This commit is contained in:
Joas Schilling 2015-03-02 18:01:51 +01:00
parent 5fc004f8ea
commit ed4c05c7b5
1 changed files with 1 additions and 2 deletions

View File

@ -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";