Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Tharundi Manjusa Nilumika Naiduwa
Translate the the tool tips of language portlet
March 11, 2009 12:43 AM
Answer

Tharundi Manjusa Nilumika Naiduwa

Rank: New Member

Posts: 5

Join Date: March 9, 2009

Recent Posts

We use liferay 5.1.1 and I need to know how to translate the tool tips of languages in language portlet
Michelle Hoshi
RE: Translate the the tool tips of language portlet
March 11, 2009 4:54 PM
Answer

Michelle Hoshi

LIFERAY STAFF

Rank: Junior Member

Posts: 61

Join Date: July 22, 2008

Recent Posts

Hi Tharundi,

I'm not sure if this is it but take a look at this wiki. Hopefully it will be of some help.

~ michelle
Tharundi Manjusa Nilumika Naiduwa
RE: Translate the the tool tips of language portlet
March 12, 2009 8:04 PM
Answer

Tharundi Manjusa Nilumika Naiduwa

Rank: New Member

Posts: 5

Join Date: March 9, 2009

Recent Posts

Hi Michelle Thanks for your reply .We have already translated the liferay in to Sinhala. What I need to do is translate the tool tip of language icon in to Sinahala
Attachments: Tooltip translation.bmp (2,214.1k)
Auditya manikanta Vadrevu
RE: Translate the the tool tips of language portlet
March 12, 2009 9:55 PM
Answer

Auditya manikanta Vadrevu

Rank: Liferay Master

Posts: 621

Join Date: May 6, 2008

Recent Posts

hi Michelle Kawaye,

I have added a new language to liferay. The new language is appearing perfectly. Iam maintaining Portal in two languages. My problem is when user wants the portal in other language only the properties which we have specified in language file that will only effect like portlet names, pagename, permissions etc.., but actually this will not complete the requirement, the data which we enter in english also must change to selected language. How to achieve this? any idea ...


Thanks in Advance,
V.Auditya
Julio Camarero
RE: Translate the the tool tips of language portlet
March 24, 2009 1:10 AM
Answer

Julio Camarero

LIFERAY STAFF

Rank: Liferay Legend

Posts: 1664

Join Date: July 15, 2008

Recent Posts

Hi Auditya,

all the Web Content you add can be added using all the languages you have defined in your portal. When you add new web content you can add diferent content for each language.

Regards,

Julio Camarero
Auditya manikanta Vadrevu
RE: Translate the the tool tips of language portlet
March 24, 2009 2:48 AM
Answer

Auditya manikanta Vadrevu

Rank: Liferay Master

Posts: 621

Join Date: May 6, 2008

Recent Posts

HI Julio Camarero ,

thanks for ur reply. it helped alot.

I have an idea but i dont know is it actually possible or not. Can we keep an automatic program ( for translation like google translator) in our portal so that every time we enter data only once but not for every language.


Thanks in Advance,
V.Auditya
Julio Camarero
RE: Translate the the tool tips of language portlet
March 25, 2009 12:49 AM
Answer

Julio Camarero

LIFERAY STAFF

Rank: Liferay Legend

Posts: 1664

Join Date: July 15, 2008

Recent Posts

Hi Auditya,

altought that is not included in Liferay, you may be able to extend Liferay functionality to behave as you want using the EXT Environment.
However, automatic translations usually need someone to review them as they don't have a very hight quality so I don't know if it is worthy.

Cheers!
Auditya manikanta Vadrevu
RE: Translate the the tool tips of language portlet
March 25, 2009 2:59 AM
Answer

Auditya manikanta Vadrevu

Rank: Liferay Master

Posts: 621

Join Date: May 6, 2008

Recent Posts

hi Julio Camarero,

thanks for ur suggestion.



With Regards,
V.Auditya
Auditya manikanta Vadrevu
RE: Translate the the tool tips of language portlet
March 28, 2009 12:14 AM
Answer

Auditya manikanta Vadrevu

Rank: Liferay Master

Posts: 621

Join Date: May 6, 2008

Recent Posts

hi Julio Camarero,

i have followed the tip u have suggested of entering multiple languages in web content. but how messsage boards and blogs can be handled.? how the data in it be managed in another language ?


With regards,
V.Auditya
Julio Camarero
RE: Translate the the tool tips of language portlet
March 28, 2009 8:37 AM
Answer

Julio Camarero

LIFERAY STAFF

Rank: Liferay Legend

Posts: 1664

Join Date: July 15, 2008

Recent Posts

Hi Auditya,

Liferay doesn't provide this functionality for Blogs or Message Boards.

However, you can modify Liferay's default behaviour yourself using the EXT Environment to develop this functionality and contribute it to the community.

Thanks a lot,
Auditya manikanta Vadrevu
RE: Translate the the tool tips of language portlet
March 30, 2009 3:20 AM
Answer

Auditya manikanta Vadrevu

Rank: Liferay Master

Posts: 621

Join Date: May 6, 2008

Recent Posts

hi Julio Camarero ,

i have seen the code in edit_article.jsp,

 1
 2String languageId = LanguageUtil.getLanguageId(request);
 3
 4String defaultLanguageId = ParamUtil.getString(request, "defaultLanguageId");
 5
 6if (article == null) {
 7    defaultLanguageId = languageId;
 8}
 9else {
10    if (Validator.isNull(defaultLanguageId)) {
11        defaultLanguageId =    article.getDefaultLocale();
12    }
13}
14
15Locale defaultLocale = LocaleUtil.fromLanguageId(defaultLanguageId);
16
17String content = null;
18
19if (article != null) {
20    content = article.getContentByLocale(languageId);
21}
22else {
23    content = ParamUtil.getString(request, "content");
24}


Is this how i must start in message boards also, any idea ...



With Regards,
V.Auditya
Tharundi Manjusa Nilumika Naiduwa
RE: Translate the the tool tips of language portlet
April 19, 2009 12:57 AM
Answer

Tharundi Manjusa Nilumika Naiduwa

Rank: New Member

Posts: 5

Join Date: March 9, 2009

Recent Posts

Hi I was able to translate the language of tool tip on langugage portlet.In order to do this copy the portal-web/docroot /html/taglib/ui/language/page.jsp file in to ext-web/docroot /html/taglib/ui/language folder and change the below coding.( alt="<%= locales.getDisplayName(locales) %>" title="<%= LanguageUtil.get(LocaleUtil.fromLanguageId(LocaleUtil.toLanguageId(locales)),"language-alt") %>") in <c:choose> block. This is the place where liferay loading the tooltips and relevant country flags relevant to each locale in language portlet as well l as in themes. After changing the below coding add a new property call “language-alt” property to Language_* .properties files which is reside in ext/ext-impl/src/content


<c:choose>
<c:when test="<%= (displayStyle == LanguageTag.LIST_LONG_TEXT) || (displayStyle == LanguageTag.LIST_SHORT_TEXT) %>">
<a href="<%= formAction %>&<%= name %>=<%= locales.getLanguage() + "_" + locales.getCountry() %>">
<%= language %>

<c:if test="<%= duplicateLanguages.contains(locales.getLanguage()) %>">
(<%= country %>)
</c:if>
</a>

<c:if test="<%= i + 1 < locales.length %>">
|
</c:if>
</c:when>
<c:otherwise>
<a href="<%= formAction %>&<%= name %>=<%= locales.getLanguage() + "_" + locales.getCountry() %>">
<img border="0" src="<%= themeDisplay.getPathThemeImages() %>/language/<%= LocaleUtil.toLanguageId(locales) %>.png" alt="<%= locales.getDisplayName(locales) %>" title="<%= LanguageUtil.get(LocaleUtil.fromLanguageId(LocaleUtil.toLanguageId(locales)),"language-alt") %>" /></a>
</c:otherwise>
</c:choose>

<%
}
%>