[OWASP-ESAPI] Internationalization

Andrew van der Stock vanderaj at owasp.org
Mon Feb 16 06:24:34 EST 2009


There is already a GNU gettext interface which many platforms (C, PHP,  
etc) use. We should sub-class from that, as it's an interface that  
would be familiar to many.


PHP is appalling for I18N, so any effort you make will improve their  
lot until PHP 6 arrives.

.NET has a very sophisticated locale, I18N, culture and location  
environment, and we should make ESAPI transparent for that platform.  
Folks who are more familiar with .NET should pipe up now!


On 16/02/2009, at 2:19 PM, Jim Manico wrote:

> I've been talking with Pawan off-line about ESAPI  
> internationalization,
> here are my thoughts:
> 1) We need a basic Internationalization interface for ESAPI that all
> other ESAPI libraries will use when displaying user data
> 2) We need to add a "locale" attribute to the ESAPI User object.
> 3) Functions in the Internationalization interface supported should  
> include
>     a) convert a string to a specific locale  (this one only will be
> used mostly by the other ESAPI classes)
>     b) edit a certain string/locale combinatio
>     c) delete a certain string/locale combination
>     d) list all supported locales
> 4) The interface should be able support several different kinds of  
> persistence engines - resource bundles or a database.
> Here, let me just bust out some psuedocode...
> Interface Internationalizer {
>     //sourceData is a token to represent a label on a GUI in the  
> apps base language, usually US english
>     String result function i(String sourceData, Locale l);
>     //handles add or edit events
>     void editTranslation(String sourceData, String editData, Locale  
> locale);
>     void deleteTranslation(String sourceData, Locale locale);
>     //delete all translations for a specific token
>     void deleteTranslation(String sourceData);
>     //delete all translations for a specific locale
>     void deleteTranslation(Locale locale);
>     List<Locale> getLocales();
>     List<String> getTokens(Locale locale);
> }
> Thoughts?
> - Jim
> -- 
> Jim Manico, Senior Application Security Engineer
> jim.manico at aspectsecurity.com
> (301) 604-4882 (work)
> (808) 652-3805 (cell)
> Aspect Security™
> Securing your applications at the source
> http://www.aspectsecurity.com
> _______________________________________________
> OWASP-ESAPI mailing list
> OWASP-ESAPI at lists.owasp.org
> https://lists.owasp.org/mailman/listinfo/owasp-esapi

-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://lists.owasp.org/pipermail/owasp-esapi/attachments/20090216/10029114/attachment.html 

More information about the OWASP-ESAPI mailing list