Skip to Content
author's profile photo Former Member
Former Member

Localization and Internationalization of jsps in Hybris e commerce portal

Hi

I have a question on Internationalisation and localization.

We have a requirement where we are giving the language change option to customer on Customer Profile page. Once customer submits the request for language page, the whole page (i.e header, footer and the profile page ( which is a jsp) ) needs to be refreshed with the language that the user has submitted.

Can anyone please tell me what is the best approach for the same.

I referred Localization and internationalization documentation on wiki hybris, but it talks about Item Type localization etc etc.

I want localization on jsps for which i suposeHybris dont have any OOTB support (please confirm on this). Does tag usage will be a good option to go with?

Add a comment
10|10000 characters needed characters exceeded

Related questions

3 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Jul 11, 2014 at 09:58 AM

    Accelerator does this out of the box.

    The "spring:theme" tag is used to get the localized text:

     <div id="productTabs">
         <div class="tabHead"><spring:theme code="product.product.details" /></div>
         <div class="tabBody"><product:productDetailsTab product="${product}"/></div>
         <div class="tabHead" id="tab-reviews"><spring:theme code="review.reviews" /></div>
         <div class="tabBody" ><product:productPageReviewsTab product="${product}"/></div>
         <cms:pageSlot position="Tabs" var="tabs">
             <cms:component component="${tabs}"/>
         </cms:pageSlot>
     </div>
    
    

    which loads the message from properties files in /yacceleratorstorefront/web/webroot//WEB-INF

    The above "product.product.details" from base_.properties:

     product.product.details           = Product details
     product.product.details.more      = More product details
     
    
    

    If you are not using Accelerator, then you can deconstruct how this works and use the same mechanism.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jul 11, 2014 at 04:26 PM

    In addition to Konrads comments we have a fully working demonstrable approach in our B2C Electronic Store which we ship as a sample store with the Commerce Accelerator. Just ensure the electronicsstore AddOn is included in your localextensions.xml

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on May 18, 2015 at 11:50 PM

    Hello Konard, We have a similar requirement for french. However, was wondering if we can generate base_fr.properties file by using OOTB hybris language pack. Any suggestion will be very much helpful.

    Thank You!

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.