The following SQL code (form MySQL) extracts the translations inserted for taxonomy and menu with the version 1.x and put them in the
new strings translation engine (localizertranslation table) :
insert into localizertranslation
(object_key, object_name, object_field, translation, locale)
SELECT m.mid, IF(m.type=115, 'menu', 'menu_item'), 'title', substring( t.translation, 1, 255 ) , t.locale
FROM locales_source s
INNER JOIN locales_target t ON s.lid = t.lid
INNER JOIN menu m ON substring( s.source, 1, 255 ) = m.title
WHERE m.type IN (115,118) AND substring( t.translation, 1, 255 )<>'';
insert into localizertranslation
(object_key, object_name, object_field, translation, locale)
SELECT td.tid, 'taxonomy_term', 'name', substring( t.translation, 1, 255 ) , t.locale
FROM locales_source s
INNER JOIN locales_target t ON s.lid = t.lid
INNER JOIN term_data td ON substring( s.source, 1, 255 ) = td.name
WHERE substring( t.translation, 1, 255 )<>'';
insert into localizertranslation
(object_key, object_name, object_field, translation, locale)
SELECT v.vid, 'taxonomy_vocabulary', 'name', substring( t.translation, 1, 255 ) , t.locale
FROM locales_source s
INNER JOIN locales_target t ON s.lid = t.lid
INNER JOIN vocabulary v ON substring( s.source, 1, 255 ) = v.name
WHERE substring( t.translation, 1, 255 )<>'';
Comments
Comment #1
Roberto Gerola commentedThe table used for nodes is called now localizernode.
MySQL SQL instruction :
RENAME TABLE localizer TO localizernode;
Comment #2
Roberto Gerola commentedInstructions available in the online book now :
http://drupal.org/node/107677