Specifying language code is now required when getting library translations.
parent
2011e856c0
commit
43188bb7e0
|
@ -153,14 +153,14 @@ class H5PDevelopment {
|
||||||
* @param int $minorVersion of the library.
|
* @param int $minorVersion of the library.
|
||||||
* @return string Translation
|
* @return string Translation
|
||||||
*/
|
*/
|
||||||
public function getLanguage($name, $majorVersion, $minorVersion) {
|
public function getLanguage($name, $majorVersion, $minorVersion, $language) {
|
||||||
$library = H5PDevelopment::libraryToString($name, $majorVersion, $minorVersion);
|
$library = H5PDevelopment::libraryToString($name, $majorVersion, $minorVersion);
|
||||||
|
|
||||||
if (isset($this->libraries[$library]) === FALSE) {
|
if (isset($this->libraries[$library]) === FALSE) {
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->getFileContents($this->libraries[$library]['path'] . '/language/' . $this->language . '.json');
|
return $this->getFileContents($this->libraries[$library]['path'] . '/language/' . $language . '.json');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -175,4 +175,3 @@ class H5PDevelopment {
|
||||||
return $name . ' ' . $majorVersion . '.' . $minorVersion;
|
return $name . ' ' . $majorVersion . '.' . $minorVersion;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue