Woof! On Fri, 06 Jun 2008 14:33:52 -0400, Misha Vodsedalek <[EMAIL PROTECTED]> wrote:
> 4. As the order of the date prompts is really directly tied to the voice > prompts recorded for the specific language, we could add a special file to > the stdprompts_xx directory to indicate that the DMY order is required. For > example, the presence of the file "DMY.wav" (or maybe just "DMY") would > indicate that this specific language (or this set of voice prompts) requires > the DMY order. For all existing stdprompts_xx directories, this special > file wouldn't be present, so the default (MDY) order would be used. > Localization packages could include this file with other voice prompt files, > so no changes would be required in that area. At the startup of the Media > Server, the presence of this special file in the stdprompts directory would > be checked and the appropriate flag passed down to the method getDateFrom() > that needs it. The file itself could possibly contain a text that describes > what it is used for. Yes! See below. > Also, if someone (maybe Woof! :-) is opiniated about where in the Media > Server code the flag should be retrieved and how, I am open to suggestions. > I don't really want to retrieve it in the getDateFrom() method, I don't want > to pass it as a parameter through way too many levels, a global variable > does not feel right as an acceptable way of passing it down (even though it > would be the simplest approach).... Opinionated...who me? ;-) The new IVR stuff will be using the wonderful MessageFormat and ChoiceFormat classes in Java. Those give the ability to paramaterize all the text formatting of messages in a localized way. I'm extending that concept to include languange specific ordering of prompts, including language specific number to text conversion, which includes dates. This is all done with Java .properties files, with each language and variant adding an additional property files with only the overriding "differences" between it and the default language. The properties files are all loaded with PropertyResourceBundle's which handle the overriding. See http://java.sun.com/javase/6/docs/api/java/text/MessageFormat.html http://java.sun.com/javase/6/docs/api/java/util/PropertyResourceBundle.html It will look something like this, where each property provides a list of files to play, or a place to plug in a variable. (File ivr.properties) # Message recorded on {month day} at {hour minute second} recorded_on="message_recorded_on.wav {0,date, "MD"} at.wav {0, time, "HMS"}" (File ivr_en_US_yoda.properties) # At {day month year} {hour minute} message recorded was recorded_on="at.wav {0, date, "DMY"} {0, time, "HM"} message_recorded_on_yoda.wav" This lets each language and variant add extra prompts, and override prompt order and add parameters to date time, currency, etc. So, until this is ready and we've re-written voicemail in it, you'll have to come up with some other way. But I think you can use a similar approach (at least in just the way of finding parameters to date/time on a per-locale basis) to use in the meantime. And please don't hide it in a .wav file! --Woof! _______________________________________________ sipx-dev mailing list [email protected] List Archive: http://list.sipfoundry.org/archive/sipx-dev Unsubscribe: http://list.sipfoundry.org/mailman/listinfo/sipx-dev
