djtext 0.1.0

Library for text internationalization inspired by gettext.


To use this package, run the following command in your project's root directory:

Manual usage
Put the following dependency into your project's dependences section:

djtext

djtext provides functions to handle localization.

Based on Anton Gushcha similar work.

Example:

import std.stdio, std.opt, dtext;

void main(string[] args) {
  string locale;
  getopt(args, "l|lang", &locale);

  defaultLocale = locale;
  writeln(_("Hello, world!")); \\ or use getdtext
}

If text for translation cannot be found in specified locale name, the text can be saved and written down to a special fuzzy texts file at program shutdown. That should help to add new localization fast and without program recompilation.

License

Distributed under the Boost Software License, Version 1.0. See copy at http://www.boost.org/LICENSE10.txt.

Authors:
  • Orfeo Da Viá
Dependencies:
none
Versions:
0.3.0 2019-Sep-26
0.2.2 2019-May-28
0.2.1 2019-May-08
0.2.0 2019-May-06
0.1.0 2019-May-06
Show all 6 versions
Download Stats:
  • 0 downloads today

  • 0 downloads this week

  • 0 downloads this month

  • 100 downloads total

Score:
0.8
Short URL:
djtext.dub.pm