Error translate

Autor erbi, 26. Listopad 2013, 12:12

0 Članovi i 1 Gost pregledava ovu temu.

erbi

Pozdrav!

Evo kod:

private function checkLanguagePackages()
{
$languages = JLanguage::getKnownLanguages();

foreach($languages as $language)
{
$oldPackage = false;
if(!in_array($language['tag'], array("en-GB")))
{
if(is_file(JPATH_SITE . "/language/".$language['tag']."/".$language['tag'].".com_jevents.ini") || is_file(JPATH_ADMINISTRATOR. "/language/".$language['tag']."/".$language['tag'].".com_jevents.ini"))
{
$oldPackage = true;


A sad me interesuje, kad če bit $oldPackage = true.
Ja mislim da tada, kad pronađe:
/language/hr-HR/hr-HR.com_jevents.ini i
/administrator/language/hr-HR/hr-HR.com_jevents.ini
Sam u pravu?
Ovi fajlovi su tamo, gdje treba (isto i kod en-GB), al javi grešku:
Citat:
Your JEvents language package for Croatian (Croatia) is not the latest official release from JEvents. Please go to JEvents site and get the latest version to enable live update system for JEvents languages

Onebeat



private function checkLanguagePackages()
{
$languages = JLanguage::getKnownLanguages();

foreach($languages as $language)
{
$oldPackage = false;
if(!in_array($language['tag'], array("en-GB")))
{
if(is_file(JPATH_SITE . "/language/".$language['tag']."/".$language['tag'].".com_jevents.ini") && is_file(JPATH_ADMINISTRATOR. "/language/".$language['tag']."/".$language['tag'].".com_jevents.ini"))
{
$oldPackage = true;


Probaj ovaj kod...

Zamjenio sam ti || sa && - prvo u prijevodu znači ili a drugo i sto je velika razlika...
Truth will set you free

erbi

Hvala @Onebeat

Ovo je kod novije verzije jEvents 3.1.10 i neznam zašto svaki put javlja grešku.