Hi everyone,
I'm using AEM 6.5 for creating multilingual site, but some thinks is steel not clear.
After building structure and impleneting footer and header component, I don't know right way, how to add different content to header or footer in different languages.
In my case header and footer are part of some template, so all configuration is stored in /conf/.../header or /conf/.../footer respectively.
Is it possible somehow configure components differently for different languages? For example in footer add link A for language A, and link B for language B?
Solved! Go to Solution.
Views
Replies
Total Likes
Looks like your content architecture is missing some pieces ...
If your header and footer must be language aware, you would not maintain their *content* inside /conf, but rather inside the respective content and language tree. You can either maintain them centrally inside the language tree (outside the displayed content tree) and then reference the content from there, or maybe much simpler: maintain them inside an iparsys and fill the content in at the language root page.
But content should never be stored inside /conf, and the things displayed inside headers and footers is relevant content, which should be authorable by authors; it might need elevated privileges to do so, but it's not an administrative thing. And for that type of content, i18n is the worst solution, because then you need either a developer to create the proper i18n translations or you expose the i18n translation editor, which also breaks typical authoring experience. Plus it's likely to vanish after the next deployment. Short: Do not use thei18n framework/subsystem for that.
HTH,
Jörg
Have you tried using the i18n Api? Check [1] and [2]
Views
Replies
Total Likes
Looks like your content architecture is missing some pieces ...
If your header and footer must be language aware, you would not maintain their *content* inside /conf, but rather inside the respective content and language tree. You can either maintain them centrally inside the language tree (outside the displayed content tree) and then reference the content from there, or maybe much simpler: maintain them inside an iparsys and fill the content in at the language root page.
But content should never be stored inside /conf, and the things displayed inside headers and footers is relevant content, which should be authorable by authors; it might need elevated privileges to do so, but it's not an administrative thing. And for that type of content, i18n is the worst solution, because then you need either a developer to create the proper i18n translations or you expose the i18n translation editor, which also breaks typical authoring experience. Plus it's likely to vanish after the next deployment. Short: Do not use thei18n framework/subsystem for that.
HTH,
Jörg
If you want to have different content for header and footer for different languages I would like to suggest this approach
1. create separate header and footer components
2. In the Basepage include the iparsys for header and footer sections, so all the child pages inheriting the basepage gets the ipasrsys sections for header and footer
3. Go to your language page, example you have EN/US, in US page, you can drag and drop the header and footer in the respective iparsys sections of header and footer
4. Edit the content in header and footer as per your langugage content
Therefore all the pages under US, will be inheriting the header and footer content as well. Similarly for other languages.
Hope this helps!
Cal
Views
Likes
Replies