Forums

Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Dinesh Balaji
To display multiple language portlet in dockbar ?
February 6, 2011 11:03 PM
Answer

Dinesh Balaji

Rank: Junior Member

Posts: 52

Join Date: October 6, 2010

Recent Posts

Hi,

I want to diaplay the language portlet ( which we made it as a text instead of flag images)in the dockbar as a drop down( Similar to the liferay website language selection). How to implement this.

Thanks in advance.

Regards,
Dinesh Balaji V
Amos Fong
RE: To display multiple language portlet in dockbar ?
February 6, 2011 11:33 PM
Answer

Amos Fong

LIFERAY STAFF

Rank: Liferay Legend

Posts: 1896

Join Date: October 7, 2008

Recent Posts

Hi Dinesh,

You can invoke the language taglib in your theme's vm files like this:

1$taglibLiferay.language()


Take a look at VelocityTaglib.java for more APIs with more parameters.
Dinesh Balaji
RE: To display multiple language portlet in dockbar ?
February 6, 2011 11:49 PM
Answer

Dinesh Balaji

Rank: Junior Member

Posts: 52

Join Date: October 6, 2010

Recent Posts

Hi Amos,


I want to add language as a drop down in theme-header(dockbar\view.jsp).

In liferay 5.2.3 we have dock.vm to do following change

$taglibLiferay.language("fm", null,"languageId",3)

I'm using Liferay 6 where I don't see dock.vm file. Instead of this file I found dockbar\view.jsp.

How to add above code change in dockbar\view.jsp?

Regards,
Dinesh
Amos Fong
RE: To display multiple language portlet in dockbar ?
February 7, 2011 12:05 AM
Answer

Amos Fong

LIFERAY STAFF

Rank: Liferay Legend

Posts: 1896

Join Date: October 7, 2008

Recent Posts

Hm...yea there's no dock.vm anymore in 6.x. To override view.jsp you need to use a jsp hook.

http://www.liferay.com/community/wiki/-/wiki/Main/Portal+Hook+Plugins
Dinesh Balaji
RE: To display multiple language portlet in dockbar ?
February 7, 2011 12:21 AM
Answer

Dinesh Balaji

Rank: Junior Member

Posts: 52

Join Date: October 6, 2010

Recent Posts

Hi Amos,

Thanks for quick reply.

I have created hook by reading that web link.

Could you give me equivalent code for

$taglibLiferay.language("fm",null,"languageId",3)

in dockbar\view.jsp file?

Thanks in Advance
Dinesh
hung ngo
RE: To display multiple language portlet in dockbar ?
February 7, 2011 12:29 AM
Answer

hung ngo

Rank: New Member

Posts: 15

Join Date: July 5, 2008

Recent Posts

you can try this emoticon to display 3 languages in a horizontal lines

1
2<liferay-ui:language displayStyle="0" languageIds='<%= new String[]{"en_US","pt_BR","zh_CN"} %>' />
3       
sandhya shendre
RE: To display multiple language portlet in dockbar ?
February 7, 2011 1:24 AM
Answer

sandhya shendre

Rank: New Member

Posts: 5

Join Date: January 21, 2011

Recent Posts

Hi Amos,

$taglibLiferay
How to get velocity variables in jsp page?


Regards,
Sandhya Shendre
sandhya shendre
RE: To display multiple language portlet in dockbar ?
February 7, 2011 12:19 PM
Answer

sandhya shendre

Rank: New Member

Posts: 5

Join Date: January 21, 2011

Recent Posts

Hi Amos,

I need your help.

I want to display language drop down similar to 'Manage' which appears in header (dockbar\view.jsp)

I have tried the same way how 'Manage' has added in dockbar\view.jsp

but mouse over event is not getting triggered.
I have modified dockbar.js file also (similar to 'Manage' changes)

Please help me.


Regards,
Sandhya Shendre
Amos Fong
RE: To display multiple language portlet in dockbar ?
February 8, 2011 7:43 PM
Answer

Amos Fong

LIFERAY STAFF

Rank: Liferay Legend

Posts: 1896

Join Date: October 7, 2008

Recent Posts

Sandhya,

Sorry I'm not sure how to do that. I think (not sure) you have to do something with the addMenu function in dockbar.js.
Juhi Kumari
RE: To display multiple language portlet in dockbar ?
January 10, 2012 1:57 AM
Answer

Juhi Kumari

Rank: Expert

Posts: 347

Join Date: December 12, 2011

Recent Posts

Hi Sandhya,

Did you get the solution for this? I also need the same but not getting solution.

Regards
Juhi