<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:arial,helvetica,sans-serif;font-size:10pt"><div style="font-family: arial,helvetica,sans-serif; font-size: 10pt;">I wouldn't think this to be too hard.<br><br>In most internationalized applications I've seen, there is typically a "lang" or "strings" file that contains all of the strings for a given application. Then when the code needs a string it will call a global variable containing that error/warning/info message. This way all of the needed translation is isolated to a single file. Changing languages becomes a matter of loading an alternate language file.<br><br>So there could be a collection of language files:<br>strings.en.js<br>strings.es.js<br>strings.fr.js<br>strnigs.de.js<br><br>And then provide some basic facilities for switching between them. In fact, each of those files could be a JSON object that gets loaded to a
global object/variable.<br><br>I may be just spewing bad ideas... but so long as the creative juices were flowing I'd thought I'd share.<br><br>-Duck<br><br><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;">----- Original Message ----<br>From: Jachym Cepicky <jachym.cepicky@gmail.com><br>To: Bart van den Eijnden (OSGIS) <bartvde@osgis.nl><br>Cc: "dev@openlayers" <dev@openlayers.org><br>Sent: Thursday, October 18, 2007 8:58:42 AM<br>Subject: Re: [OpenLayers-Dev] status of translation possibilities<br><br>
Bart van den Eijnden (OSGIS) píše v Čt 18. 10. 2007 v 15:44 +0200:<br>> Hi Chris,<br>> <br>> I think it is acceptable to have a global setting. I can't imagine a <br>> common use case (for myself) where one map would be in English and <br>> another one in Dutch on the same page. It is important though that it
is <br>> possible to switch languages.<br>> <br>+1<br><br>jachym<br><br>> Best regards,<br>> Bart<br>> <br>> Christopher Schmidt schreef:<br>> > On Thu, Oct 18, 2007 at 03:23:50PM +0200, Jachym Cepicky wrote:<br>> > <br>> >> Hi,<br>> >><br>> >> I would like to ask about the status of OpenLayers language
support.<br>> >> There are not many strings, which could be translated, however,
some are<br>> >> there and IMHO we should (de)find a way, how to make this
possible. Was<br>> >> there some discussion to this topic?<br>> >><br>> >> IMHO, new map attribute "lang" should be defined, as well as new
method<br>> >> OpenLayer.Util.getOLString("English text") (or similar). <br>> >><br>> >> Any suggestions? Should I write something like this? Is there
already<br>> >> some code out there?<br>> >> <br>> ><br>> > No code yet, but I agree that now is the time.<br>> ><br>> > <a href="http://trac.openlayers.org/wiki/RFC/Internationalization" target="_blank">http://trac.openlayers.org/wiki/RFC/Internationalization</a><br>> ><br>> > Is my start at an RFC, which never went far enough.<br>> ><br>> > My belief is that we should make this a global setting, rather than
a<br>> > per-map configuration. This would mean you could not have multiple<br>> > languages on the same page at the same time, but would also mean
you<br>> > don't need a reference to the map object in order to get a correct<br>> > translation string. I don't know if the trade off is worth it. What
do<br>> > other people think? <br>> ><br>> > Regards,<br>> > <br>> <br>> <br>-- <br>Jachym Cepicky<br>e-mail: <a ymailto="mailto:jachym.cepicky@gmail.com" href="mailto:jachym.cepicky@gmail.com">jachym.cepicky@gmail.com</a><br>URL: <a href="http://les-ejk.cz" target="_blank">http://les-ejk.cz</a><br>GPG: <a href="http://www.les-ejk.cz/pgp/jachym_cepicky-gpg.pub" target="_blank">http://www.les-ejk.cz/pgp/jachym_cepicky-gpg.pub</a><br><br></div><br></div></div><br>__________________________________________________<br>Do You Yahoo!?<br>Tired of spam? Yahoo! Mail has the best spam protection around <br>http://mail.yahoo.com </body></html>