Customized Internationalization

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Customized Internationalization

Florin Popa
Hello,

Considering an Ofbiz instance running and offering 2 different
/ecommerce sites, how is it possible to have customized I18N texts for
each /eccomerce?

I am currently using an Ofbiz 4.0.x version.

Any help would be really appreciated.

Best regards,
 Flopa
Reply | Threaded
Open this post in threaded view
|

Re: Customized Internationalization

c.schinzer
Check
http://docs.ofbiz.org/display/OFBIZ/Guide+to+OFBiz-i18n%2C++Internationalisation+of+OFBiz

which is still WIP, but could probably point you to some ideas of what needs
customisation.

As for content pages: Use the CMS.

Regarding the default language for two ecom applications, my impression is
that the ecommerce default language settings and the one for the ofbiz
instance are identical.

I have asked the list about experience with distributed setups ... no answer
so far.

An idea (but no guarantee it works) would be e.g.:
* run different instances of OFBiz with different default language settings
which would be using the same database.
* next you would probably not want to start all the backoffice applications
with the ecommerce app and vice versa ...

So it can get complex soon.

Well, as for i18n -- check the FAQ or start with the doc mentioned above.
Feel free to send comments on that doc directly to me or use the Confluence
commenting options.

Regards


Carsten

2009/9/9 Florin Popa <[hidden email]>

> Hello,
>
> Considering an Ofbiz instance running and offering 2 different /ecommerce
> sites, how is it possible to have customized I18N texts for each /eccomerce?
>
> I am currently using an Ofbiz 4.0.x version.
>
> Any help would be really appreciated.
>
> Best regards,
> Flopa
>



--

Best

Carsten Schinzer

Waisenhausstr. 53a
80637 München
Germany
Reply | Threaded
Open this post in threaded view
|

Re: Customized Internationalization

Florin Popa
Hello Carsten,

First of all thanks for your detailed answer.
I am a bit affraid it did not reach the core of my question - because my
idea is:
    - one single Ofbiz instance
    - inside this instance there are 2 shops running for 2 separate
merchants
    - I have a single set of I18N files for English
    - one merchant wants to have all "search" buttons with the
label/text "Search"
    - the second merchant wants to have the same above labels but with a
different text like "Find"

Best regards,
 Flopa

> Check
> http://docs.ofbiz.org/display/OFBIZ/Guide+to+OFBiz-i18n%2C++Internationalisation+of+OFBiz
>
> which is still WIP, but could probably point you to some ideas of what needs
> customisation.
>
> As for content pages: Use the CMS.
>
> Regarding the default language for two ecom applications, my impression is
> that the ecommerce default language settings and the one for the ofbiz
> instance are identical.
>
> I have asked the list about experience with distributed setups ... no answer
> so far.
>
> An idea (but no guarantee it works) would be e.g.:
> * run different instances of OFBiz with different default language settings
> which would be using the same database.
> * next you would probably not want to start all the backoffice applications
> with the ecommerce app and vice versa ...
>
> So it can get complex soon.
>
> Well, as for i18n -- check the FAQ or start with the doc mentioned above.
> Feel free to send comments on that doc directly to me or use the Confluence
> commenting options.
>
> Regards
>
>
> Carsten
>
> 2009/9/9 Florin Popa <[hidden email]>
>
>  
>> Hello,
>>
>> Considering an Ofbiz instance running and offering 2 different /ecommerce
>> sites, how is it possible to have customized I18N texts for each /eccomerce?
>>
>> I am currently using an Ofbiz 4.0.x version.
>>
>> Any help would be really appreciated.
>>
>> Best regards,
>> Flopa
>>
>>    
>
>
>
>  

Reply | Threaded
Open this post in threaded view
|

Re: Customized Internationalization

c.schinzer
Wow. Sounds like you're getting to the core of things.

Well, I can only suggests workarounds as follows:

Idea (1): (Ab)use the labels for a different Locale where-ever the other
merchant wants another wording behind the scenes. That is, say you use the
"de" labels for the other merchant while unchanged "en" labels are good for
one of both.
The issue there is: There is no way (at least I did not find it) to start
the ecommerce application with a locale other than the default one. This
will be true for both shops, i.e. one of your merchants will always need to
change the Locale, or at least login, before they can see their custom
locales.

Idea (2): Just hardcode any specific lable for your second merchant in the
copy of the ecommerce application. If it is a customisation for a single
merchant and not re-used ... well that sounds the most feasible thing to me.
Do a "uiLabelMap" text search in the webapp and widget directories of your
copied ecommerce application and you should be seing fairly quickly what the
amount of elements is that need to be changed.
This is then of course disable any locale change with your copied
application. So Locale change must not be a requirement for that app.

The ideal scenario is that you go by Locale flavours in analogy to e.g.
en_US, en_UK etc. That would mean you only need to maintain your deviations
on the UiLabelmap files (but in turn need to make sure all your language
flavours are defined in the Locale Change functionality configuration), but
*is that worth it*?
Its a trade off between making this a re-usable change (and hence the
community will expect you to share this at some point) or is this really a
freaky-spleeny idea of your customer / the merchant which would be withdrawn
once the (cost) impact is made clear to them? So I recommend to ask them
whether this is a nice to have or a hard requirement that they want to pay
for.

Not sure whether this sounds clear and can give you some guidance. Let me
know.

Regards

Carsten


2009/9/10 Florin Popa <[hidden email]>

> Hello Carsten,
>
> First of all thanks for your detailed answer.
> I am a bit affraid it did not reach the core of my question - because my
> idea is:
>   - one single Ofbiz instance
>   - inside this instance there are 2 shops running for 2 separate merchants
>   - I have a single set of I18N files for English
>   - one merchant wants to have all "search" buttons with the label/text
> "Search"
>   - the second merchant wants to have the same above labels but with a
> different text like "Find"
>
> Best regards,
> Flopa
>
>  Check
>>
>> http://docs.ofbiz.org/display/OFBIZ/Guide+to+OFBiz-i18n%2C++Internationalisation+of+OFBiz
>>
>> which is still WIP, but could probably point you to some ideas of what
>> needs
>> customisation.
>>
>> As for content pages: Use the CMS.
>>
>> Regarding the default language for two ecom applications, my impression is
>> that the ecommerce default language settings and the one for the ofbiz
>> instance are identical.
>>
>> I have asked the list about experience with distributed setups ... no
>> answer
>> so far.
>>
>> An idea (but no guarantee it works) would be e.g.:
>> * run different instances of OFBiz with different default language
>> settings
>> which would be using the same database.
>> * next you would probably not want to start all the backoffice
>> applications
>> with the ecommerce app and vice versa ...
>>
>> So it can get complex soon.
>>
>> Well, as for i18n -- check the FAQ or start with the doc mentioned above.
>> Feel free to send comments on that doc directly to me or use the
>> Confluence
>> commenting options.
>>
>> Regards
>>
>>
>> Carsten
>>
>> 2009/9/9 Florin Popa <[hidden email]>
>>
>>
>>
>>> Hello,
>>>
>>> Considering an Ofbiz instance running and offering 2 different /ecommerce
>>> sites, how is it possible to have customized I18N texts for each
>>> /eccomerce?
>>>
>>> I am currently using an Ofbiz 4.0.x version.
>>>
>>> Any help would be really appreciated.
>>>
>>> Best regards,
>>> Flopa
>>>
>>>
>>>
>>
>>
>>
>>
>>
>
>


--

Best

Carsten Schinzer

Waisenhausstr. 53a
80637 München
Germany
Reply | Threaded
Open this post in threaded view
|

Re: Customized Internationalization

Jacques Le Roux
Administrator
For point 1, you could try -Duser.language, like we used before (see startofbiz.bat in rel 4.0 for instance)

But this does not mean that it's the best solution not even that it will work, in other words : my 2 cts

Jacques

From: "Carsten Schinzer" <[hidden email]>
Wow. Sounds like you're getting to the core of things.

Well, I can only suggests workarounds as follows:

Idea (1): (Ab)use the labels for a different Locale where-ever the other
merchant wants another wording behind the scenes. That is, say you use the
"de" labels for the other merchant while unchanged "en" labels are good for
one of both.
The issue there is: There is no way (at least I did not find it) to start
the ecommerce application with a locale other than the default one. This
will be true for both shops, i.e. one of your merchants will always need to
change the Locale, or at least login, before they can see their custom
locales.

Idea (2): Just hardcode any specific lable for your second merchant in the
copy of the ecommerce application. If it is a customisation for a single
merchant and not re-used ... well that sounds the most feasible thing to me.
Do a "uiLabelMap" text search in the webapp and widget directories of your
copied ecommerce application and you should be seing fairly quickly what the
amount of elements is that need to be changed.
This is then of course disable any locale change with your copied
application. So Locale change must not be a requirement for that app.

The ideal scenario is that you go by Locale flavours in analogy to e.g.
en_US, en_UK etc. That would mean you only need to maintain your deviations
on the UiLabelmap files (but in turn need to make sure all your language
flavours are defined in the Locale Change functionality configuration), but
*is that worth it*?
Its a trade off between making this a re-usable change (and hence the
community will expect you to share this at some point) or is this really a
freaky-spleeny idea of your customer / the merchant which would be withdrawn
once the (cost) impact is made clear to them? So I recommend to ask them
whether this is a nice to have or a hard requirement that they want to pay
for.

Not sure whether this sounds clear and can give you some guidance. Let me
know.

Regards

Carsten


2009/9/10 Florin Popa <[hidden email]>

> Hello Carsten,
>
> First of all thanks for your detailed answer.
> I am a bit affraid it did not reach the core of my question - because my
> idea is:
>   - one single Ofbiz instance
>   - inside this instance there are 2 shops running for 2 separate merchants
>   - I have a single set of I18N files for English
>   - one merchant wants to have all "search" buttons with the label/text
> "Search"
>   - the second merchant wants to have the same above labels but with a
> different text like "Find"
>
> Best regards,
> Flopa
>
>  Check
>>
>> http://docs.ofbiz.org/display/OFBIZ/Guide+to+OFBiz-i18n%2C++Internationalisation+of+OFBiz
>>
>> which is still WIP, but could probably point you to some ideas of what
>> needs
>> customisation.
>>
>> As for content pages: Use the CMS.
>>
>> Regarding the default language for two ecom applications, my impression is
>> that the ecommerce default language settings and the one for the ofbiz
>> instance are identical.
>>
>> I have asked the list about experience with distributed setups ... no
>> answer
>> so far.
>>
>> An idea (but no guarantee it works) would be e.g.:
>> * run different instances of OFBiz with different default language
>> settings
>> which would be using the same database.
>> * next you would probably not want to start all the backoffice
>> applications
>> with the ecommerce app and vice versa ...
>>
>> So it can get complex soon.
>>
>> Well, as for i18n -- check the FAQ or start with the doc mentioned above.
>> Feel free to send comments on that doc directly to me or use the
>> Confluence
>> commenting options.
>>
>> Regards
>>
>>
>> Carsten
>>
>> 2009/9/9 Florin Popa <[hidden email]>
>>
>>
>>
>>> Hello,
>>>
>>> Considering an Ofbiz instance running and offering 2 different /ecommerce
>>> sites, how is it possible to have customized I18N texts for each
>>> /eccomerce?
>>>
>>> I am currently using an Ofbiz 4.0.x version.
>>>
>>> Any help would be really appreciated.
>>>
>>> Best regards,
>>> Flopa
>>>
>>>
>>>
>>
>>
>>
>>
>>
>
>


--

Best

Carsten Schinzer

Waisenhausstr. 53a
80637 München
Germany


Reply | Threaded
Open this post in threaded view
|

Re: Customized Internationalization

Florin Popa
In reply to this post by c.schinzer
Hello Carsten,

Yes, actually we really need to go deeper because these are the
requirements :)
Thanks a lot for your suggestions, we already had a closer look but it
does not see fully to be the way we need it...
Meanwhile there are few hits, I consider important to list them here so
that you or someone else could confirm if we are on the rght track:

There are 4 main "locations" where I18N is involved: ftl templates, bsh
files, xml files and .java files.
First ones seems for me most difficult...


Inm case of ftl templates:

org.ofbiz.widget.screen. ModelScreenAction. runAction  --> from context
I can get productStoreId so I can distinguish between different shops

 
I can of .java files or XML/bsh files --> We can have a convention so
that every resource or key get the productStoreId as a suffix of its name

Additionally, inside org.ofbiz.base.util. UtilProperties.
getResourceBundleMap we need also to have a way to know productStoreId..

Do you think something like this will work?

On a separate mail thread I would also post few questions regarding
production settings as well as Transaction Manager and connection
pooling solutions - because I am not 100% convinced which is the best
way to go

Best regards,
 Flopa

> Wow. Sounds like you're getting to the core of things.
>
> Well, I can only suggests workarounds as follows:
>
> Idea (1): (Ab)use the labels for a different Locale where-ever the other
> merchant wants another wording behind the scenes. That is, say you use the
> "de" labels for the other merchant while unchanged "en" labels are good for
> one of both.
> The issue there is: There is no way (at least I did not find it) to start
> the ecommerce application with a locale other than the default one. This
> will be true for both shops, i.e. one of your merchants will always need to
> change the Locale, or at least login, before they can see their custom
> locales.
>
> Idea (2): Just hardcode any specific lable for your second merchant in the
> copy of the ecommerce application. If it is a customisation for a single
> merchant and not re-used ... well that sounds the most feasible thing to me.
> Do a "uiLabelMap" text search in the webapp and widget directories of your
> copied ecommerce application and you should be seing fairly quickly what the
> amount of elements is that need to be changed.
> This is then of course disable any locale change with your copied
> application. So Locale change must not be a requirement for that app.
>
> The ideal scenario is that you go by Locale flavours in analogy to e.g.
> en_US, en_UK etc. That would mean you only need to maintain your deviations
> on the UiLabelmap files (but in turn need to make sure all your language
> flavours are defined in the Locale Change functionality configuration), but
> *is that worth it*?
> Its a trade off between making this a re-usable change (and hence the
> community will expect you to share this at some point) or is this really a
> freaky-spleeny idea of your customer / the merchant which would be withdrawn
> once the (cost) impact is made clear to them? So I recommend to ask them
> whether this is a nice to have or a hard requirement that they want to pay
> for.
>
> Not sure whether this sounds clear and can give you some guidance. Let me
> know.
>
> Regards
>
> Carsten
>
>
> 2009/9/10 Florin Popa <[hidden email]>
>
>  
>> Hello Carsten,
>>
>> First of all thanks for your detailed answer.
>> I am a bit affraid it did not reach the core of my question - because my
>> idea is:
>>   - one single Ofbiz instance
>>   - inside this instance there are 2 shops running for 2 separate merchants
>>   - I have a single set of I18N files for English
>>   - one merchant wants to have all "search" buttons with the label/text
>> "Search"
>>   - the second merchant wants to have the same above labels but with a
>> different text like "Find"
>>
>> Best regards,
>> Flopa
>>
>>  Check
>>    
>>> http://docs.ofbiz.org/display/OFBIZ/Guide+to+OFBiz-i18n%2C++Internationalisation+of+OFBiz
>>>
>>> which is still WIP, but could probably point you to some ideas of what
>>> needs
>>> customisation.
>>>
>>> As for content pages: Use the CMS.
>>>
>>> Regarding the default language for two ecom applications, my impression is
>>> that the ecommerce default language settings and the one for the ofbiz
>>> instance are identical.
>>>
>>> I have asked the list about experience with distributed setups ... no
>>> answer
>>> so far.
>>>
>>> An idea (but no guarantee it works) would be e.g.:
>>> * run different instances of OFBiz with different default language
>>> settings
>>> which would be using the same database.
>>> * next you would probably not want to start all the backoffice
>>> applications
>>> with the ecommerce app and vice versa ...
>>>
>>> So it can get complex soon.
>>>
>>> Well, as for i18n -- check the FAQ or start with the doc mentioned above.
>>> Feel free to send comments on that doc directly to me or use the
>>> Confluence
>>> commenting options.
>>>
>>> Regards
>>>
>>>
>>> Carsten
>>>
>>> 2009/9/9 Florin Popa <[hidden email]>
>>>
>>>
>>>
>>>      
>>>> Hello,
>>>>
>>>> Considering an Ofbiz instance running and offering 2 different /ecommerce
>>>> sites, how is it possible to have customized I18N texts for each
>>>> /eccomerce?
>>>>
>>>> I am currently using an Ofbiz 4.0.x version.
>>>>
>>>> Any help would be really appreciated.
>>>>
>>>> Best regards,
>>>> Flopa
>>>>
>>>>
>>>>
>>>>        
>>>
>>>
>>>
>>>      
>>    
>
>
>