internationalization - Cakephp delete translation for specific language -
I have tried to make some translation behavior on a model. But how do I delete a specific translation?
My example is a class in which its name should be translated, which should be translated. Let me have a translation in English and Spanish How can I delete the Spanish translation? Offcouse I can create my own SQL query but there is a way to do this in the cakepp.
there is no cake function to do this
However, receiving This is quite easy for
Delete all translations for a given location
Any destructive action to remove all translations for a given locale - by doing anything First DB backup can first fix a mistake or remove something unexpected): Of course, the locale depends on your specific application - you can check your configuration, or just ask DB: Just add a model status: You will need to know the ID of the record that you want to operate, then: If you ask questions directly on DB do not believe, first to see what you want to delete: I.e. Find what you want, and then just change the
Delete from i18n WHERE locale = 'AS Minister ';
SELECT DISTINCT (Locale) FROM i18n;
Delete all translations for a given locale and model
Delete from i18n WHERE Locale = Esp 'and Model =' Category ';
Delete all translations for specific model fields
Remove from
i18n WHERE locale = 'esp' and model = 'range' and foreign_kar = 2468789 and field = 'name';
SELECT * WHERE locale = 'ASP' from I18n and model = 'category' and foreign_key = 2468789 and field = 'name';
SELECT to a
DELETE statement.
Comments
Post a Comment