I've got a site with some text in header/footer/nav that needs to be translated between an English and Spanish site, which use the same design. My intention was to set up all the text as content to facilitate. However, if I use a standard dialog with the component's path set to a child of the current page node, I would need to re-enter the text on every page. If I use a design dialog, or a standard dialog with the component's path set absolutely, the Engilsh and Spanish sites will share the same text. If I use a standard dialog with the component's path set relatively (eg path="../../jcr:content/myPath"), the pages using the component would all need to be at the same level of the hierarchy.
It appears that the Geometrixx demo doesn't address this situation, and leaves copy in English. Is there a best practice for this scenario?
you may either
- use the concept the navigation uses and define the level from where the text should be grabbed
- use an inheritance model, see for example the calendar component, it gets the first parent that has the property defined for things like the edit form
- use i18n to translate
I see, I can set the path of the component dynamically. Thanks.
I'm finding that something to the effect of <cq:include path="<%= strCommonContentPath + "codeEntry" %>" resourceType ...
works fine for most components, but not for parsys, or a component containing a parsys. When I attempt that, I get a JS error that says "design.path is null or not an object". Is there a way around this?