here mix:language node is not allowing to create sling:basename property, Can anybody hep me to resolve this issue.
I followed the instructions on this page (http://docs.adobe.com/docs/en/cq/current/developing/cq5-translator.html) in order to try to give my component access to a translatable string bundle. I followed these instructions (http://www.wemblog.com/2011/12/how-to-use-multi-language-translation.html) to setup the component's JSP file to use the translated strings. However, it's not working; the default value is always used. I'm not sure where it is attempting to pull the resource bundle from, but I would like it to pull from the i18n folder I've created directly under the component node. Any ideas what I am doing wrong?
Relevant JSP code:
<cq:setContentBundle language="se" source="static" /><% Locale pageLocale = currentPage.getLanguage(false); ResourceBundle resourceBundle = slingRequest.getResourceBundle("hello-world-strings", pageLocale); I18n i18n = new I18n(resourceBundle); %> <div style="margin:1em;padding:.8em;box-shadow:inset 0px 0px .5em #ddd;border:solid 1px #aaa;"> <h1>Translation Testing Output</h1> OUT: <%= i18n.get("name") %> </div>
Solved! Go to Solution.
Views
Replies
Total Likes
You should put the sling:basename property on the mix:language node.
Views
Replies
Total Likes
Hi,
Just a guess - does your i18n node structure not have the right sling:basename property?
Regards,
Justin
Views
Replies
Total Likes
I thought that might be the problem, so I copied it directly. I think I put it in the right location (as a property on the i18n node); see screenshot.
[img]Screen Shot 2014-08-19 at 3.30.43 PM.png[/img]
Views
Replies
Total Likes
You should put the sling:basename property on the mix:language node.
Views
Replies
Total Likes
I have created language dictionary as per "https://docs.adobe.com/docs/en/aem/6-1/develop/components/i18n/translator.html".
here mix:language node is not allowing to create sling:basename property, Can anybody hep me to resolve this issue.
Hi,
It looks like there needs to be an additional mixin which allows the sling:basename property on nt:file nodes. You can create your own mixin to do that, but please also file a DayCare ticket so this gets addressed in the product.
Regards,
Justin
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies