[
http://mifosforge.jira.com/browse/MIFOS-3970?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=63133#action_63133
]
Stanley Kwok commented on MIFOS-3970:
-------------------------------------
Created a new FTL Template Method called DateFormatter that formats a date
object into localized string. The method accepts either a java.util.Date object
or org.joda.time.DateTime, a format pattern that conforms to
java.text.SimpleDateFormat and an instance of java.util.Locale.
Here is an example of how the template method should be called from an FTL:
${mifos.date_formatter(monthlyCashFlow.dateTime, "MMMM",
Application.ConfigLocale.locale)}
FWIW, there is another way to localize month names without using DateFormatter:
${monthlyCashFlow.getMonthInLocale(Application.ConfigLocale.locale)}
Note: getMonthInLocale(locale) is a method of MonthlyCashFlowForm object. One
can invoke a method on the model directly in FTL. Cool!
Commit: 39c29fcd0d2feba4261fc9a86872dd9a70ddec96
> get localized month names from Java or Joda Time
> ------------------------------------------------
>
> Key: MIFOS-3970
> URL: http://mifosforge.jira.com/browse/MIFOS-3970
> Project: mifos
> Issue Type: Bug
> Components: Internationalization, Localization
> Reporter: Adam Monsen
> Assignee: Stanley Kwok
> Priority: Major
> Fix For: Elsie F
>
>
> cashflow/src/main/resources/org/mifos/platform/cashflow/ui/localizedProperties/cashflow_messages.properties
> contains month names. Java and/or Joda Time have translated month names, so
> we don't need to store and translate them.
> Remove the month names from cashflow_messages.properties and use a library
> (something built in to Java or Joda Time) to fetch localized month names,
> using the locale configured for Mifos (not the system locale!).
> There might even be a Freemarker macro for getting localized month names.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://mifosforge.jira.com/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
------------------------------------------------------------------------------
Learn how Oracle Real Application Clusters (RAC) One Node allows customers
to consolidate database storage, standardize their database environment, and,
should the need arise, upgrade to a full multi-node Oracle RAC database
without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
Mifos-issues mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mifos-issues