[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [docbook-apps] Design for moving English strings out of the webhelpJavaScript file nwSearchFnt.js
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 06/02/2011 10:54 AM, Peter Desjardins wrote: > I'm not sure this is more elegant. It might be easier to maintain though. > > I added this on every HTML page: > > <script type="text/javascript" src="common/localization-strings.js"> > > I added common/localization-strings.js with this content: > > //Resource strings for localization > var localeresource = new Object; > localeresource["search_no_results"]="Your search returned no results."; > > I changed the line in nwSearchFnt.js this way: > > } else { > results = "<p>" + localeresource.search_no_results + "</p>"; > } > > Now the webhelp XSLT can generate common/localization-strings.js using > its language strings. Any of the other JavaScript files in the webhelp > can draw from the localeresource object. > > Sound reasonable? Very much so. I'll try to do that this weekend. Thanks, David -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQEcBAEBAgAGBQJN57V3AAoJEMHeSXG7afUhP5MIAICf2n+VXa/erFp2cTLhPVtA ozIHr4yNn0Sjs8afYugyO+05wXTjnXhyvy2IQFPGJi/g+owF730IJo1H+sQLDL97 m8XuIrQYXZRCt5M7ajUAMNKkhcyKh/KPmz9/NBFS/ymxUOMe6gMcCMFRYufvrD3m f5EIAXmFsIKMBOEyT4IRdcLpPKJA5fOTfkWDtKxqvWU87mZYG2YpqiGA6aqQWeRq IG5tP9ji7cQEoH3vxXsQqaw0oGGaPySVECIwrgujvr1isGC2eRM94TlPY+pQgQ8v k2D1dLo8dOVMu+NctKC9ScakAkPQDVmgd/IVihEPlSDcgk1fOZhmJ6rkxzPgJC0= =C/tv -----END PGP SIGNATURE-----
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]