Foros de discusión
Translate User Titles (Listtype and Countries)
Corné Pantheon Automatisering Nederland, modificado hace 14 años.
Translate User Titles (Listtype and Countries)
Liferay Legend Mensajes: 1313 Fecha de incorporación: 3/10/06 Mensajes recientes
Marcus Souza, modificado hace 14 años.
RE: Translate User Titles
Junior Member Mensajes: 58 Fecha de incorporación: 31/03/09 Mensajes recientes
I am not sure in your case. But i had the same Problem with the localisation of the Web Form Portlet.
I went in the source code and checked where those name were created. You can creat a place holder and translate it in your ext enviroment in another language
for example
then I translated in my <language>-ext.properties "title" and "description" and it worked
not sure if it works in your case. . .
Marcus
I went in the source code and checked where those name were created. You can creat a place holder and translate it in your ext enviroment in another language
for example
<legend><%= LanguageUtil.get(pageContext, HtmlUtil.escape([b]title[/b])) %></legend>
<p class="description"><%= LanguageUtil.get(pageContext, HtmlUtil.escape([b]description[/b])) %></p>
then I translated in my <language>-ext.properties "title" and "description" and it worked
not sure if it works in your case. . .
Marcus
Corné Pantheon Automatisering Nederland, modificado hace 14 años.
RE: Translate User Titles
Liferay Legend Mensajes: 1313 Fecha de incorporación: 3/10/06 Mensajes recientes
I found the original values.
There in the database;
How do i make these multilingual ?
There in the database;
How do i make these multilingual ?
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (1, 'Canada', 'CA', 'CAN', '124', '001', 1);
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (2, 'China', 'CN', 'CHN', '156', '086', 1);
........
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (227, 'Zimbabwe', 'ZW', 'ZWE', '716', '263', 1);
insert into Region (regionId, countryId, regionCode, name, active_) values (1001, 1, 'AB', 'Alberta', 1);
..................
insert into Region (regionId, countryId, regionCode, name, active_) values (202026, 202, 'ZH', 'Zürich', 1);
##
## List types for accounts
##
insert into ListType (listTypeId, name, type_) values (10000, 'Billing', 'com.liferay.portal.model.Account.address');
insert into ListType (listTypeId, name, type_) values (10001, 'Other', 'com.liferay.portal.model.Account.address');
insert into ListType (listTypeId, name, type_) values (10002, 'P.O. Box', 'com.liferay.portal.model.Account.address');
insert into ListType (listTypeId, name, type_) values (10003, 'Shipping', 'com.liferay.portal.model.Account.address');
insert into ListType (listTypeId, name, type_) values (10004, 'E-mail', 'com.liferay.portal.model.Account.emailAddress');
insert into ListType (listTypeId, name, type_) values (10005, 'E-mail 2', 'com.liferay.portal.model.Account.emailAddress');
insert into ListType (listTypeId, name, type_) values (10006, 'E-mail 3', 'com.liferay.portal.model.Account.emailAddress');
insert into ListType (listTypeId, name, type_) values (10007, 'Fax', 'com.liferay.portal.model.Account.phone');
insert into ListType (listTypeId, name, type_) values (10008, 'Local', 'com.liferay.portal.model.Account.phone');
insert into ListType (listTypeId, name, type_) values (10009, 'Other', 'com.liferay.portal.model.Account.phone');
insert into ListType (listTypeId, name, type_) values (10010, 'Toll-Free', 'com.liferay.portal.model.Account.phone');
insert into ListType (listTypeId, name, type_) values (10011, 'TTY', 'com.liferay.portal.model.Account.phone');
insert into ListType (listTypeId, name, type_) values (10012, 'Intranet', 'com.liferay.portal.model.Account.website');
insert into ListType (listTypeId, name, type_) values (10013, 'Public', 'com.liferay.portal.model.Account.website');
##
## List types for contacts
##
insert into ListType (listTypeId, name, type_) values (11000, 'Business', 'com.liferay.portal.model.Contact.address');
insert into ListType (listTypeId, name, type_) values (11001, 'Other', 'com.liferay.portal.model.Contact.address');
insert into ListType (listTypeId, name, type_) values (11002, 'Personal', 'com.liferay.portal.model.Contact.address');
insert into ListType (listTypeId, name, type_) values (11003, 'E-mail', 'com.liferay.portal.model.Contact.emailAddress');
insert into ListType (listTypeId, name, type_) values (11004, 'E-mail 2', 'com.liferay.portal.model.Contact.emailAddress');
insert into ListType (listTypeId, name, type_) values (11005, 'E-mail 3', 'com.liferay.portal.model.Contact.emailAddress');
insert into ListType (listTypeId, name, type_) values (11006, 'Business', 'com.liferay.portal.model.Contact.phone');
insert into ListType (listTypeId, name, type_) values (11007, 'Business Fax', 'com.liferay.portal.model.Contact.phone');
insert into ListType (listTypeId, name, type_) values (11008, 'Mobile', 'com.liferay.portal.model.Contact.phone');
insert into ListType (listTypeId, name, type_) values (11009, 'Other', 'com.liferay.portal.model.Contact.phone');
insert into ListType (listTypeId, name, type_) values (11010, 'Pager', 'com.liferay.portal.model.Contact.phone');
insert into ListType (listTypeId, name, type_) values (11011, 'Personal', 'com.liferay.portal.model.Contact.phone');
insert into ListType (listTypeId, name, type_) values (11012, 'Personal Fax', 'com.liferay.portal.model.Contact.phone');
insert into ListType (listTypeId, name, type_) values (11013, 'TTY', 'com.liferay.portal.model.Contact.phone');
insert into ListType (listTypeId, name, type_) values (11014, 'Dr.', 'com.liferay.portal.model.Contact.prefix');
insert into ListType (listTypeId, name, type_) values (11015, 'Mr.', 'com.liferay.portal.model.Contact.prefix');
insert into ListType (listTypeId, name, type_) values (11016, 'Mrs.', 'com.liferay.portal.model.Contact.prefix');
insert into ListType (listTypeId, name, type_) values (11017, 'Ms.', 'com.liferay.portal.model.Contact.prefix');
insert into ListType (listTypeId, name, type_) values (11020, 'II', 'com.liferay.portal.model.Contact.suffix');
insert into ListType (listTypeId, name, type_) values (11021, 'III', 'com.liferay.portal.model.Contact.suffix');
insert into ListType (listTypeId, name, type_) values (11022, 'IV', 'com.liferay.portal.model.Contact.suffix');
insert into ListType (listTypeId, name, type_) values (11023, 'Jr.', 'com.liferay.portal.model.Contact.suffix');
insert into ListType (listTypeId, name, type_) values (11024, 'PhD.', 'com.liferay.portal.model.Contact.suffix');
insert into ListType (listTypeId, name, type_) values (11025, 'Sr.', 'com.liferay.portal.model.Contact.suffix');
insert into ListType (listTypeId, name, type_) values (11026, 'Blog', 'com.liferay.portal.model.Contact.website');
insert into ListType (listTypeId, name, type_) values (11027, 'Business', 'com.liferay.portal.model.Contact.website');
insert into ListType (listTypeId, name, type_) values (11028, 'Other', 'com.liferay.portal.model.Contact.website');
insert into ListType (listTypeId, name, type_) values (11029, 'Personal', 'com.liferay.portal.model.Contact.website');
##
## List types for organizations
##
insert into ListType (listTypeId, name, type_) values (12000, 'Billing', 'com.liferay.portal.model.Organization.address');
insert into ListType (listTypeId, name, type_) values (12001, 'Other', 'com.liferay.portal.model.Organization.address');
insert into ListType (listTypeId, name, type_) values (12002, 'P.O. Box', 'com.liferay.portal.model.Organization.address');
insert into ListType (listTypeId, name, type_) values (12003, 'Shipping', 'com.liferay.portal.model.Organization.address');
insert into ListType (listTypeId, name, type_) values (12004, 'E-mail', 'com.liferay.portal.model.Organization.emailAddress');
insert into ListType (listTypeId, name, type_) values (12005, 'E-mail 2', 'com.liferay.portal.model.Organization.emailAddress');
insert into ListType (listTypeId, name, type_) values (12006, 'E-mail 3', 'com.liferay.portal.model.Organization.emailAddress');
insert into ListType (listTypeId, name, type_) values (12007, 'Fax', 'com.liferay.portal.model.Organization.phone');
insert into ListType (listTypeId, name, type_) values (12008, 'Local', 'com.liferay.portal.model.Organization.phone');
insert into ListType (listTypeId, name, type_) values (12009, 'Other', 'com.liferay.portal.model.Organization.phone');
insert into ListType (listTypeId, name, type_) values (12010, 'Toll-Free', 'com.liferay.portal.model.Organization.phone');
insert into ListType (listTypeId, name, type_) values (12011, 'TTY', 'com.liferay.portal.model.Organization.phone');
insert into ListType (listTypeId, name, type_) values (12012, 'Administrative', 'com.liferay.portal.model.Organization.service');
insert into ListType (listTypeId, name, type_) values (12013, 'Contracts', 'com.liferay.portal.model.Organization.service');
insert into ListType (listTypeId, name, type_) values (12014, 'Donation', 'com.liferay.portal.model.Organization.service');
insert into ListType (listTypeId, name, type_) values (12015, 'Retail', 'com.liferay.portal.model.Organization.service');
insert into ListType (listTypeId, name, type_) values (12016, 'Training', 'com.liferay.portal.model.Organization.service');
insert into ListType (listTypeId, name, type_) values (12017, 'Full Member', 'com.liferay.portal.model.Organization.status');
insert into ListType (listTypeId, name, type_) values (12018, 'Provisional Member', 'com.liferay.portal.model.Organization.status');
insert into ListType (listTypeId, name, type_) values (12019, 'Intranet', 'com.liferay.portal.model.Organization.website');
insert into ListType (listTypeId, name, type_) values (12020, 'Public', 'com.liferay.portal.model.Organization.website');
Marcus Souza, modificado hace 14 años.
RE: Translate User Titles
Junior Member Mensajes: 58 Fecha de incorporación: 31/03/09 Mensajes recientes
Sorry if I was not clear,
I did not change any values in the database. I mapped it in the language_properties (see language_properties), then I used the code above in the Portlet to show the mapped value. But as I see in your example, the value is saved in the db. I am sorry that i cant help you further.
Marcus
I did not change any values in the database. I mapped it in the language_properties (see language_properties), then I used the code above in the Portlet to show the mapped value. But as I see in your example, the value is saved in the db. I am sorry that i cant help you further.
Marcus
Corné Pantheon Automatisering Nederland, modificado hace 14 años.
RE: Translate User Titles
Liferay Legend Mensajes: 1313 Fecha de incorporación: 3/10/06 Mensajes recientes
I'm sorry too I didn't react properly to your suggestion.
But i'm translating Liferay and while testing i bump in these non translate-able keys.
But I do not understand why there are keys in the Database and because so why the dont have a locale field for translation.
But i'm translating Liferay and while testing i bump in these non translate-able keys.
But I do not understand why there are keys in the Database and because so why the dont have a locale field for translation.
Corné Pantheon Automatisering Nederland, modificado hace 14 años.
RE: Translate User Titles (Respuesta)
Liferay Legend Mensajes: 1313 Fecha de incorporación: 3/10/06 Mensajes recientes
I have searched the jira now i know the workings;
I think this should be addressed promptly so please vote for this.
A simple locale field would suffice.
I thought this existed once in previous liferay for the Country table?!
http://issues.liferay.com/browse/LPS-5150
I think this should be addressed promptly so please vote for this.
A simple locale field would suffice.
I thought this existed once in previous liferay for the Country table?!
http://issues.liferay.com/browse/LPS-5150
Simon Attila, modificado hace 13 años.
RE: Translate User Titles
New Member Mensajes: 5 Fecha de incorporación: 7/07/09 Mensajes recientes
Hi,
I am a little bit late, but maybe someone still needs it.
You can add translations using the keys from the database.
In the profile page, for example, the name is displayed using:
This way, I assumed I could add these keys with localized values to some Language-ext_xx_XX.properties file, like the French I used:
Deployed this properties file using EXT, and it seems to work (my account page).
I hope this helps.
I am a little bit late, but maybe someone still needs it.
You can add translations using the keys from the database.
In the profile page, for example, the name is displayed using:
<liferay-ui:message key="<%= prefix.getName() %>" />
This way, I assumed I could add these keys with localized values to some Language-ext_xx_XX.properties file, like the French I used:
...
Dr.=Dr
Mr.=M.
Mrs.=Mme
Ms.=Mlle
...
Deployed this properties file using EXT, and it seems to work (my account page).
I hope this helps.
Julio Camarero, modificado hace 13 años.
RE: Translate User Titles
Liferay Legend Mensajes: 1668 Fecha de incorporación: 15/07/08 Mensajes recientes
Hi Corné,
I don't know how but I missed this thread. Is this already fixed? Otherwise I will fix it asap....
I don't know how but I missed this thread. Is this already fixed? Otherwise I will fix it asap....
Corné Aussems, modificado hace 13 años.
RE: Translate User Titles
Liferay Legend Mensajes: 1313 Fecha de incorporación: 3/10/06 Mensajes recientes
Hi Julio,
It is nice to see there is some new interest in the localization issues.
http://issues.liferay.com/browse/LPS-5150 bounced back, and i solved this some otherway but since i work somewhere else i can't get to the source. Nevertheless they are still in the sql script portal-data-common.sql;
and the aui:select with listType attribute uses;
<liferay-ui:message key="<%= listTypeModel.getName() %>" />
so i think it is solved in AUI for all these issues now.
Related issue
http://issues.liferay.com/browse/LPS-5150
There are some other localization issues left though
The most important is now being solved by Juan.
http://issues.liferay.com/browse/LPS-5906
http://issues.liferay.com/browse/LPS-11712
It is nice to see there is some new interest in the localization issues.
http://issues.liferay.com/browse/LPS-5150 bounced back, and i solved this some otherway but since i work somewhere else i can't get to the source. Nevertheless they are still in the sql script portal-data-common.sql;
and the aui:select with listType attribute uses;
<c:if test="<%= Validator.isNotNull(listType) %>">
<%
int listTypeId = ParamUtil.getInteger(request, (String)request.getAttribute("aui:select:name"), BeanParamUtil.getInteger(bean, request, listTypeFieldName));
List<listtype> listTypeModels = ListTypeServiceUtil.getListTypes(listType);
for (ListType listTypeModel : listTypeModels) {
%>
<aui:option selected="<%= listTypeId == listTypeModel.getListTypeId() %>" value="<%= listTypeModel.getListTypeId() %>"><liferay-ui:message key="<%= listTypeModel.getName() %>" /></aui:option>
</listtype></c:if>
<liferay-ui:message key="<%= listTypeModel.getName() %>" />
so i think it is solved in AUI for all these issues now.
Related issue
http://issues.liferay.com/browse/LPS-5150
There are some other localization issues left though
The most important is now being solved by Juan.
http://issues.liferay.com/browse/LPS-5906
http://issues.liferay.com/browse/LPS-11712
Hitoshi Ozawa, modificado hace 13 años.
RE: Translate User Titles
Liferay Legend Mensajes: 7942 Fecha de incorporación: 24/03/10 Mensajes recientes
This is more of a localization issue than a translation issue because if you look at the "state" field, you'll also notice that not all states/prefectures in all countries are listed. These fields have to be "added" rather than translated.
Julio Camarero, modificado hace 13 años.
RE: Translate User Titles
Liferay Legend Mensajes: 1668 Fecha de incorporación: 15/07/08 Mensajes recientes
Hi guys,
I think Hitoshi has a point here, you can add new entries to your database here and then translate them as needed in your language.properties
However, I just added the existing keys from this sample data to our language.properties so that it can also be translated by default.
If you update to trunk, you should be able to see all the new keys.
Thanks a lot!
I think Hitoshi has a point here, you can add new entries to your database here and then translate them as needed in your language.properties
However, I just added the existing keys from this sample data to our language.properties so that it can also be translated by default.
If you update to trunk, you should be able to see all the new keys.
Thanks a lot!
Hitoshi Ozawa, modificado hace 13 años.
RE: Translate User Titles
Liferay Legend Mensajes: 7942 Fecha de incorporación: 24/03/10 Mensajes recientes
The "correct" I18N solution requires a little more effort. For example, there's still a problem with sorting order.
Julio Camarero, modificado hace 13 años.
RE: Translate User Titles
Liferay Legend Mensajes: 1668 Fecha de incorporación: 15/07/08 Mensajes recientes
What do you mean with sorting order Hitoshi? Could you be more precise?
Thank you!
Thank you!
Jonathon Omahen, modificado hace 13 años.
RE: Translate User Titles
Junior Member Mensajes: 31 Fecha de incorporación: 28/09/09 Mensajes recientes
Julio,
What Hitoshi observes is right on. When localising a software package, the translator has to not only translate Titles/States/Provinces, but also needs to be able to change the order in which they appear. With multibyte languages, the default sort order may not come out right, and so there should be some what to designate the order in which the States/Provinces/Titles appear.
A related issue is when dealing with forms: each country has a different address and entry format, and there should be an easy way to manipulate that (from the translator's end) without having to use a hook. Otherwise, imagine having to have a hook for almost every language, just to change the order fields appear in a form!
Let me know if I'm being more confusing than helpful; I can provide examples with screencaps if needed.
What Hitoshi observes is right on. When localising a software package, the translator has to not only translate Titles/States/Provinces, but also needs to be able to change the order in which they appear. With multibyte languages, the default sort order may not come out right, and so there should be some what to designate the order in which the States/Provinces/Titles appear.
A related issue is when dealing with forms: each country has a different address and entry format, and there should be an easy way to manipulate that (from the translator's end) without having to use a hook. Otherwise, imagine having to have a hook for almost every language, just to change the order fields appear in a form!
Let me know if I'm being more confusing than helpful; I can provide examples with screencaps if needed.
Hitoshi Ozawa, modificado hace 13 años.
RE: Translate User Titles
Liferay Legend Mensajes: 7942 Fecha de incorporación: 24/03/10 Mensajes recientes
I've attached screen shot from a Japanese localized version of User details and Address entry page.
Observe that in the user page, the birthday is in year, month, day order and there isn't any middle name, title, suffix because there aren't any in Japanese.
In the Address page, the order of the field are different. The prefecture is also arranged by location rather than by name - Hokkaido is at the top because it is the farthest North. I was, also, looking through the European states and it seems there is a slight difference between results from sorting by state abbreviation and sorting by state names.
This said, these are all trivial modifications which only require few minutes to change. I'll rather see time being spent of fixing major bugs.
Example of ones fixed:
http://issues.liferay.com/browse/LPS-14801
http://issues.liferay.com/browse/LPS-14786
Observe that in the user page, the birthday is in year, month, day order and there isn't any middle name, title, suffix because there aren't any in Japanese.
In the Address page, the order of the field are different. The prefecture is also arranged by location rather than by name - Hokkaido is at the top because it is the farthest North. I was, also, looking through the European states and it seems there is a slight difference between results from sorting by state abbreviation and sorting by state names.
This said, these are all trivial modifications which only require few minutes to change. I'll rather see time being spent of fixing major bugs.
Example of ones fixed:
http://issues.liferay.com/browse/LPS-14801
http://issues.liferay.com/browse/LPS-14786
Archivos adjuntos:
Julio Camarero, modificado hace 13 años.
RE: Translate User Titles
Liferay Legend Mensajes: 1668 Fecha de incorporación: 15/07/08 Mensajes recientes
Hi Jon and Hitoshi,
I didn't understand the problem with the address and location, can you explain a bit more? As I don't understand Japanese, the screenshots were hard to understand for me...
I understood the problem with the date selector and created a ticket for that one: LPS-15175
I didn't understand the problem with the address and location, can you explain a bit more? As I don't understand Japanese, the screenshots were hard to understand for me...
I understood the problem with the date selector and created a ticket for that one: LPS-15175