On Mon, Feb 20, 2012 at 2:37 PM, Andrei Alexandrescu <span dir="ltr"><<a href="mailto:SeeWebsiteForEmail@erdani.org">SeeWebsiteForEmail@erdani.org</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">On 2/20/12 10:16 AM, Nick Sabalausky wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
"Andrei Alexandrescu"<<a href="mailto:SeeWebsiteForEmail@erdani.org" target="_blank">SeeWebsiteForEma<u></u>il@erdani.org</a>>  wrote in message<br>
news:jhtq31$u8q$1@digitalmars.<u></u>com...<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Again, I think this thread clarified we need the "Variant[string] info;"<br>
member however we define the hierarchy.<br>
<br>
</blockquote>
<br>
I disagree. I don't see a need for that.<br>
</blockquote>
<br></div>
How would we address custom formatting of e.g. error messages?<span class="HOEnZb"><font color="#888888"><br>
</font></span></blockquote><div><br>This may not be D. Gettext says to solve it as follow:<br><br>throw new Exception(gettext("Cool English message at %s.").format(DateTime.now()))<br><br>The gettext "compiler" goes through the code an generates all the strings that need to be localized. The translation teams modifies those string and you store them in file/map for that language. At runtime the i18n library turns gettext(...) into a query into that map and returns the actual localized string. There is a map for the entire process.<br>
<br>Localization can also be disable at compile time by making gettext a template and generating a "noop" for that operation.<br><br>I have been thinking of making a module for i18n model after gettext but taking advantage of D's language features. Is there some interest in this?<br>
<br>Thanks,<br>-Jose<br></div></div><br>