On 2011-08-12 23:02, bioinfornatics wrote:
Dear,
I would like to know how do a multilanguage application. It seem it is possible 
by using flag -J but they are no document for this feature.
link givent in this page http://www.digitalmars.com/d/2.0/dmd-linux.html seem 
to be wrong

if you can do a little example, will be nice

thanks

kind regards

It's fairly simple. You just need a file containing keys and values. This file can be read either at compile time or runtime. Read the file into an associative array and when you need a piece of text translated just pass the key to a function which retries the corresponding value from the associative array.

You could take a look at how internalization is don in Ruby on Rails, this can be applied to D as well: http://guides.rubyonrails.org/i18n.html

--
/Jacob Carlborg

Reply via email to