Page 1 of 1

I18n

Posted: Sat Jul 17, 2010 11:41 am
by g000026
Hi, plans to add features for I18N?

Re: I18n

Posted: Fri Jul 23, 2010 2:39 pm
by jefffischer
The biggest chunk of i18n is handled at the presentation layer as you need to message your customers in different languages, etc... In general, Broadleaf is agnostic about the presentation layer technology employed to display the Broadleaf-powered site. However, there still are a number of aspects in which Broadleaf Commerce should be made more robust to naturally support the localization needs of the application. For example, we need to include more robust currency support. It's definitely on our roadmap for one of our next regular releases.

Re: I18n

Posted: Tue Feb 07, 2012 1:59 pm
by elbertbautista
i18n is still on the roadmap, but here's one approach to internationalization we used at a client:
http://www.elbertbautista.com/blog/?p=78

Re: I18n

Posted: Fri Jul 06, 2012 5:01 pm
by karim.hj
Hi Elbert,
As mentioned in your blog, did you start writing an implementation for an internationalized catalog in BL 1.7 ?
May you explain globally what implementation choice did you make/envisage ?

Re: I18n

Posted: Tue Oct 30, 2012 6:44 pm
by tim.bit
I was wondering if the roadmap of the upcoming features available somewhere, so it would be (somewhat) possible to find out ETA for the i18n release?
Internationalization is a mandatory feature for my project, and makes me hesitant to commit to broadleaf at this point without knowing when the feature is going to become available.
I'd rather choose a platform which supports i18n already instead of implementing it myself.

Re: I18n

Posted: Wed Oct 31, 2012 2:22 am
by pokemon007
One thing I noticed changed is the way to handle localizable messages. In v1 we can use error code in code and display error message to the end user from message.properties. Now this more localizable feature was removed and replaced with putting actual error message in html code like:

Code: Select all

    
<span class="error" th:switch="${errorCode}" th:if="${errorCode}">
    <p th:case="'invalidUser'">No account is associated with this email.</p>
    <p th:case="'inactiveUser'">The account with the email you entered is marked as inactive.   Please contact an administrator to activate your account.</p>
    <p th:case="*">Unknown error.</p>
</span>


or in jsp code like:

Code: Select all

<c:choose>
    <c:when test="${not empty param.login_error}">
         <div id="login-error">Invalid username / password combination.</div>
    </c:when>
    <c:when test="${param.messageCode == 'usernameSent'}">
         <div id="login-message">Your username was sent to the email address on file.</div>
    </c:when>
    <c:when test="${param.messageCode == 'passwordReset'}">
         <div id="login-message">Your password has been reset.  Please login with your new password.</div>
     </c:when>
</c:choose>


This will certainly make more difficult to localize the site. Any reason behind this change?

Thanks.

-Charlie

Re: I18n

Posted: Mon Nov 05, 2012 10:34 am
by aazzolini
You can still read messages from the properties files (with consideration to the current locale), using the following syntax:

Code: Select all

<div th:text="#{some.property}" />


If this doesn't pick up the property for you, you will need to move the messageSource bean out of your servlet application context and into the regular application context. This was a bug that we recently identified and fixed.

Also, we will be having an i18n release soon, which will include support for switching locales, languages, and currencies based on predefined rules or user selection.