Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

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

joell91868939
Level 3
Level 3

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>

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

1 Reply
joell91868939
Level 3
Level 3

Also tried the attached which is slightly different.