Laliwala IT Services

Laliwala IT Services
Website Development

Thursday, February 24, 2011

liferay language support, arabic language, portal work, portlets liferay, liferay language solution, language implementation, liferay`s, theme support

LIFERAY MULTIPLE LANGUAGE SUPPORT

liferay arabic language support
> Liferay developer : I need help in Interesting subject who is find in his self ability to help me seriously, please add your post
>I tried to Arabized the liferay (support Arabic language) and liferay users knew the liferay support Arabic language already but there are important point not taken into account that the direction (RIGHT TO LEFT TEXT) of the portlets and the portal not working efficiency.
So, i am looking for best way to make this possible.
Thank you.
I am eagerly waiting for your responses.

> : What help exactly you need in Liferay support language ?

> Dear Liferay Developer,

> I need help in Interesting liferay multiple language support
who is find in his self ability to help

> me seriously, please add your tutorial post  on liferay arabic language solution
> I tried to Arabized the liferay Support Arabic Language and liferay users

> knew the liferay support Arabic language already but there are important

> point not taken into account that the direction (RIGHT TO LEFT TEXT) of the portlets and

>the portal not working efficiency.

> So, i am looking for best way to make this possible.

> Thank you.

> I am eagerly waiting for your responses on liferay tutorial.



I need solution to the direction issues RIGHT TO LEFT TEXT - -LEFT TO RIGHT  of the portlets and the portal is not working efficiency.

Thank you.

> : Hi

If you're looking for tips concerning the classic theme of the 5.3 Liferay version, I found some fixes this morning.

Hello Mohamed

I was working on this this morning and had some interesting results.

I'm working on the classic theme of the 5.3 Liferay version.
I want to be able to display a page in a LTR as well as in a RTL manner depending on the current language.

First of all, check if you're declaring correctly the direction of the HTML tag in your portal_normal.vm template :


Then let's create a css file that will be dedicated to RTL issues. Let's say : "custom_rtl.css" in your css folder.
As classic themes are mostly designed for LTR, RTL styles will be exceptions that are going to override default styles.

Now we can insert in portal_normal.vm a velocity statement that will load the custom_rtl.css depending on your current language.
At the end of the "head" section of your portal_normal.vm, copy/paste this:
#if ($locale.language == "ar")
    #set ($rtlCssURL =  $themeDisplay.getTheme().getCssPath()+"/custom_rtl.css")   
    #css($rtlCssURL)
#end


With this code, if you switch from english to arabic custom_rtl.css rules will be loaded and override default css rules. (be sure you paste this at the end of the head section)

As you can see, the statement's condition is "locale.language=="ar"".
But there are other languages that are RTL.
But I did not figure out how to get the direction of the current language in Velocity. If you have a clue....
If you want to consider Hebrew and Persian you can add OR operators but it would be better to get the language direction directly.


I just did very few fixes in custom_rtl.css in order to display the menu from RTL, the breadcrumb from RTL and portlets titles from RTL. I decided as well to display fonts bigger because I find that default character size for arabic is too small, don't you?
BODY {
    font-size:14px;
}

#navigation li {
    float: right;
}

.breadcrumbs li {
    float:right;
}

.portlet-topper {
    text-align:right;
    float:right;
    width:100%;       
}

.portlet-title {       
    float:right;
}



Now I have to figure out how to move breadcrumbs and menu icons into the right and I think that it will be a good first version.
Please let us know if you find other css fixes for this issue



[EDIT]

A patch to put the company logo to the right :

#banner h1.logo {   
    float: right;       
    margin: 25px;
}

#banner .logo a {
    float: right;   
}


Regards

Mazhar Anwar : Are You still looking for solution? I have done one Liferay's Arabic implementation.

Zuhair Jawish : Hi Mazhar,

please if you can explain the steps to make Liferay support Arabic (RIGHT TO LEFT TEXT for portal and portlets)

I think the liferay is already support arabic (RIGHT TO LEFT TEXT) for portal but not for portlets like (Sign in portlet is not support)

if implement new theme support Arabic (RIGHT TO LEFT TEXT) is the solution please can you give us any example theme support RTL?

___________________________________________________________________



Edit your custom.css Write this Code in CSS for position to right.
.js .lfr-dock.interactive-mode {
right: 0px;
}

check for exact css class for dock.



Hi !

You can set the position of dock in .js .interactive-mode h2{} by giving the values like,
.js .interactive-mode h2{
right:20%;
}

Or else you can also set the values directly in the dock.vm file which is,



___________________________________________________________
Try this in custom_common.css :

.site-breadcrumbs ul{
float:right;
width:100%;
}

.site-beradcrumbs li{
float:right;
}

No comments:

Post a Comment