Update translation IDs when they are reused due to node copying, or add them when they have not yet been added to folders or documents.
To enable content translation on existing content, the hippotranslation:translated mixin needs to be added to folders and documents. Since the locale to apply depends on the content itself, this cannot be completely automated. This document describes what steps to take to convert a repository to be compatible with content translation.
Each document in a language must have a unique translation id. When documents or folders have been copied using the console interface, these ids need to be reset.
To get started, download the translation runner for Mac OS X / UNIX / Linux or Windows. Extra the package and open the runner.properties file. It should look something like:
# repository configuration repository.url=rmi://127.0.0.1:1099/hipporepository repository.user=admin repository.pass=admin # everything that starts with /content/documents #repository.path=/content/documents/hippogogreen/** repository.path=/content/documents/articles/**
repository.query=//element(*,hippogogreen:newsdocument) # Java plugins plugins.java.addtranslation.class=org.hippoecm.runner.translation.AddTranslationRunner plugins.java.addtranslation.language=en # The UpdateTranslationIdsRunner generates new translation ids for already # existing translated documents and folders. plugins.java.updatetranslationids.class=org.hippoecm.runner.translation.UpdateTranslationIdsRunner
Adjust the properties as appropriate. The first plugin, plugins.java.addtranslation.language, contains the locale that will be set on the documents. Comment it out if this is not necessary. The last plugin, the plugins.java.updatetranslationids, will update the translation ids of the documents that are visited by the path or query visitor.
Since the runner connects to the repository using RMI, running this tool on the same machine as the repository instance is advised.
Hippo Europe: +31 (0)20 5224466
Hippo North America: +1 (707) 773-4646
© 1999-2010 Hippo B.V., All Rights Reserved