This site has been archived and you can no longer log in or post new messages. For up-to-date community resources please visit ezplatform.com

eZ Community » Forums » Extensions » Creating languages with ezxmlinstaller
expandshrink

Creating languages with ezxmlinstaller

Creating languages with ezxmlinstaller

Wednesday 18 January 2012 4:22:48 pm

Hi,

We made a new handler, ezcreatelanguage.php, for creating new languages. It was working fine, until we deleted the cache directories:

rm -Rf var/cache var/.../cache

Then, the new languages disappeared, from the backend, therefore in the ezcontent_language table.

XML:

<?xml version="1.0" encoding="UTF-8"?>
<eZXMLImporter>
    <CreateLanguage>       
        <languages>
            <language locale="My first language" />
            <language locale="My second language" />
        </languages>
    </CreateLanguage>
</eZXMLImporter>

PHP:

$languages = $xml->getElementsByTagName('language');
foreach ( $languages as $language ) {
    $locale = $language->getAttribute('locale');
    $lang = eZContentLanguage::fetchByLocale($locale, TRUE);
}

I don't know the reason, in lib/ezlocale/classes/ezlocale.php, we fetch the languages from the cache, I guess there is one.

Can someone help me please, thanks!

Jean-Luc.

No reply yet!

expandshrink

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from