Forums / Install & configuration / Language Search? Find objects to remove language (EZ 3.9.2)

Language Search? Find objects to remove language (EZ 3.9.2)

Author Message

Paul Wilson

Monday 07 May 2007 4:19:34 am

Hi,

I'm wanting to remove some languages from the standard EZ 3.9.2 install (with web interface extension). However to remove the languages I don't need (german and norwegian), I need to remove the existing objects with those translations.

The big question is this... how do I find them?

I can't do an advanced search on language. For some reason I can't identify them in the ezcontentobject table. I don't want to manually search ... seems ridiculous.

Can anyone suggest a method to find these objects so I can remove the languages?

Thanks.

Paul Wilson

Monday 07 May 2007 6:57:53 pm

Here I am answering my own questions again. After a fair bit of messing about, here's what to do...

<b>Context</b>
The benefit of removing unnecessary languages and having only the main one is that there is no select box or step for choosing translations when creating a new object.

However this is not possible in a basic install of EZ 3.9.2 (+ezweb 1.2) because there are objects with translations. This process explains how to find the unwanted objects with translations ... the objects that must be removed before the language can be removed from EZ Publish (ie via admin /setup/languages).

<b>Steps</b>
1. Examine your ez database with phpmyadmin (or similar). Do a query to find objects with translations. For example:

SELECT * FROM `ezcontentobject_name` where `content_translation`="ger-DE"
&/or
SELECT * FROM `ezcontentobject_name` where `content_translation`="nor-NO"

2. The results of this query will show the names of objects that have (german) translations. In the admin interface, navigate to these objects and remove their translations.

3. (Repeat steps 1 and 2 for all unwanted languages, leaving only your main site language).

4. In the admin interface /setup/languages remove the unwanted languages.

You now have an ez publish site that does not come up with unwanted translation drop box and step in object creation.

Kristof Coomans

Tuesday 08 May 2007 11:04:25 pm

Hi Paul

Thank you for sharing this. Can be useful :-)

independent eZ Publish developer and service provider | http://blog.coomanskristof.be | http://ezpedia.org

Andy Caiger

Friday 07 March 2008 2:18:53 am

This is great, but after deleting all of the object translations, what if there is a class translation? I'm using the eZ Newsletter distribution and some objects were in German. It was easy to add English translations for them and remove the German translation, but Setup/Languages still lists one class translation for German.

Has anyone succeeded in locating and removing a translation for a class?

Andy

EAB - Integrated Internet Success
Offices in England, France & China.
http://www.eab.co.uk http://www.eab-china.com http://www.eab-france.com

Paul Wilson

Tuesday 11 March 2008 5:30:54 pm

DO NOT DO THIS ... DID NOT WORK AFTER ALL! Ideas anyone?

Problem is how to remove/change "class translations" so that an unwanted language can be removed,

Hi Andy,

I just experienced the same problem when installing eZ 4.0. I've only done this on a clean install of eZ 4.0 and have not explored the broader implications of this change (ie **no guarantees** - backup), but what I did was this:

- Get into phpmyadmin and examine the database for the eZ site.
- the database table 'ezcontentclass' contains translation information, and the one that matters for the language is language_mask
- I noted the values of language_mask and identified the values that aligned with the language I wanted to keep and the one I wanted to remove. (ie for me, values of '5' represented the language I wanted to remove, '3' the one I wanted to keep).
- I edited/changed the all the rows with language_mask value ='5', changing it to '3'
- in eZ site admin, I was then able to remove the unwanted language.

... so this worked,

I could not see how to do this via the admin interface, or whether this would undermine eZ publish in some way. Perhaps someone else can suggest an easier way and/or give us an idea on whether this is a safe approach.

Regards
- Paul