Excellent. Not one, not two, but three projects to get done in an impossible time frame.
Hard pressed on my right. My center is yielding. Impossible to maneuver. Situation excellent. I am attacking.
-General Ferdinand Foch, WWI
We have an internationalization/localization (I18N, l10n) project underway for our primary application, a branch of that application which is intended to deliver new functionality (which will also need to be localized when merged) and our biggest client would like to use our service in Japan, which would require us to learn, implement and deliver
CHTML.
Did I mention the time frame? No? Okay, then... it varies, but you can measure the weeks with your fingers. And, oh yes, don't forget testing.
So, I will attack.
One of the tasks needed for I18N is the ability to parse datetime strings. These need to be handled in a localized manner- we'll know what the locale is, and a likely format. In some cases, we'll need to 'guess' what the user entered.
I'm creating a set of regular expressions which will be dynamically loaded based on the locale of the user. There was a little fun with the
.property files, because the escaped slashes ultimately expand out to
four slashes to get just one into a Java
String. With this worked out, my regex expressions behaved much better. Thank goodness for unit tests, which allowed me to refactor the code again and again.
In case I'm unclear, unit tests rock. Highly recommended. If you're not using them, well, you must be a dilatory masochist programmer. Props to you for being so tough.
----------
End of day. I've worked on all three projects, wrapping up by doing time localizing stored procs in the database. I've run into an issue that the replicated data in the warehouse side of the DB is different than the oltp side. I need to figure out why, and how to fix it, before I enter a bunch of localized data into these tables.