Can anyone point me to some document referring how to create component dialog in multilingual fashion. All the UI fields in the dialog should be based on language the author is editing. TIA
Solved! Go to Solution.
Views
Replies
Total Likes
I remember I tried these steps sometime back,
Do check these steps for have I18n in dialogs
http://teknopoint.us/internationalization-of-adobe-cq5-authoring-i18n/
Views
Replies
Total Likes
SDharmaraj wrote...
Can anyone point me to some document referring how to create component dialog in multilingual fashion. All the UI fields in the dialog should be based on language the author is editing. TIA
can you explain your question with more details ?
Thanks,
Mani Kumar K
Views
Replies
Total Likes
I remember I tried these steps sometime back,
Do check these steps for have I18n in dialogs
http://teknopoint.us/internationalization-of-adobe-cq5-authoring-i18n/
Views
Replies
Total Likes
Hi
Please have a look at these two approach:
Link:- http://www.aemcq5tutorials.com/tutorials/implement-internationalization-in-adobe-cq/
//
Internationalization can be achieved by using i18n bundle approach in adobe CQ or AEM(Adobe Experience Manager). Based on our use-case/requirement there are different approaches to implement internationalization in adobe cq.
Let’s see both the approaches to implement internationalization in Adobe CQ –
Approach 1
If we have to print and value in js(JavaScript) file we can directly use granite api.
For Ex:- Granite.I18n.get("Letter created successfully.")
Approach 2
If we want to display certain text in different language based on URL,page language or region detected by browser. Then we should use internationalization feature of CQ.
Let’s understand how to implement it with an example:-
Read the article to get full details of the same.
Thanks and Regards
Kautuk Sahni
Views
Replies
Total Likes
edubey wrote...
I remember I tried these steps sometime back,
Do check these steps for have I18n in dialogs
http://teknopoint.us/internationalization-of-adobe-cq5-authoring-i18n/
Thanks for the link, i was looking specifically for the dialog UI field's label. Appreciate it.
Thanks everyone!
Views
Replies
Total Likes
Does this worked "http://teknopoint.us/internationalization-of-adobe-cq5-authoring-i18n/" I have followed the same steps. but it is not able to fetch the I18N label values with the key name. instead it displays the key name itself treated as the value for the dialog widget and shows in the dialog. any inputs for implementation.?
Views
Replies
Total Likes
kk krish wrote...
Does this worked "http://teknopoint.us/internationalization-of-adobe-cq5-authoring-i18n/" I have followed the same steps. but it is not able to fetch the I18N label values with the key name. instead it displays the key name itself treated as the value for the dialog widget and shows in the dialog. any inputs for implementation.?
It worked for me but only after made sure the locale is loading properly for language pages. Do this test.
Browse the page where you have this component , open the browser console and run Granite.I18n.getLocale(). It should give "fr" or "de" or whatever language you are looking for.
One strange thing i noticed is if we have /cf# in the URL , Granite.I18n.getLocale() always returns "en" and if i remove /cf# from the URL , Granite.I18n.getLocale() gives the correct locale string.
If the locale is not set properly, make sure you set the language for the page in page properties and set the locale from the request by code in the page component like below
<%@include file="/libs/foundation/global.jsp" %>
<%@ page import="com.day.cq.i18n.I18n, java.util.ResourceBundle,java.util.Locale" %>
<%
Locale pageLang = currentPage.getLanguage(false);
ResourceBundle resourceBundle = slingRequest.getResourceBundle(pageLang);
I18n i18n = new I18n(resourceBundle);
%>
<script>
Granite.I18n.setLocale("<%=pageLang%>");
</script>
Hope this helps.
Views
Replies
Total Likes
Views
Likes
Replies