Highlighted

Translation of Text in (custom) panelContainer.jsp not working

Avatar

Avatar

joell91868939

Avatar

joell91868939

joell91868939

10-05-2017

We've created a custom accordion panel with "Add" "Remove" buttons. Now we need to translate these to french.

AEM 6.2 SP1.

Why doesn't i18n.get("Add") give french back? Is this the right api?

We are using ManualTranslation, and http://localhost:4502/libs/cq/i18n/translator.html

-Joel

"==========================="

<%@include file="/libs/fd/af/components/guidesglobal.jsp"%>
<%@page session="false"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
<%@page import="java.util.Locale,java.util.ResourceBundle,com.day.cq.i18n.I18n"%>
<%@include file="/libs/foundation/global.jsp"%>

<cq:setContentBundle/>
<% final Locale pageLocale = currentPage.getLanguage(true); 
final ResourceBundle resourceBundle = slingRequest.getResourceBundle(pageLocale); 
I18n i18n = new I18n(resourceBundle); %> 

...


                        <button name="Add" class="Add af-icon-button" data-guide-addremove="add" data-guide-id="${panelItem.id}" aria-label="${panelItem.addMessage}"><%= i18n.get("Add") %> </button>

 "================================"

Replies

Highlighted

Avatar

Avatar

joell91868939

Avatar

joell91868939

joell91868939

11-05-2017

Also tried the attached which is slightly different.