On Sat, 2002-02-16 at 15:23, Eduard Bloch wrote: > +#ifdef USE_LANGUAGE_CHOOSER > + /* ugly... this will work as long as the LANG name has two chars. Preffer "us > " > + * when "en". */ > + sprintf(nf_state.server.hostname, "http.%s.debian.org", strcmp(lang->locale, > "en")==0 ? "us" : lang->locale ); > +#endif
I think there are a few problems with this. Firstly, it doesn't seem that you can extrapolate from "http.us.debian.org" to other countries (there are no DNS entries for other names of that form, as far as I can see). Even if you use "ftp.CC.debian.org", not all countries have a mirror so you would need some way of checking if the server exists or not. And, finally, lang->locale is a full locale name like "en_GB.ISO-8859-1", not just a language code -- you might have been thinking of lang->msgcat, which is just the language name, but even that would probably give you the wrong results for pt_BR and ja_JP. If we want to provide suggestions for nearby mirrors, I don't honestly think there is any reliable way to derive an address from the locale name. It would almost certainly be better to just add an extra "lang->mirror" field or something and let people fill in their favourite mirrors in the language .src files. p. -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]