summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Makefile.am4
-rw-r--r--src/catalog.d19
-rwxr-xr-xsrc/helloworld.d6
3 files changed, 27 insertions, 2 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index 84f04c3..947351c 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,12 +1,12 @@
lib_LTLIBRARIES = libtestshlibrary.la
libtestshlibrary_la_SOURCES = testshlibrary.d
-libtestshlibrary_la_LDFLAGS = -version-info 0:1:0 -module
+libtestshlibrary_la_LDFLAGS = -version-info 0:0:0 -module
noinst_LIBRARIES = libtestlibrary.a
libtestlibrary_a_SOURCES = testlibrary.d
bin_PROGRAMS = helloworld
-helloworld_SOURCES = helloworld.d
+helloworld_SOURCES = helloworld.d catalog.d
helloworld_LDADD = $(DEPS_LIBS) $(top_srcdir)/config.d libtestlibrary.a libtestshlibrary.la
helloworld_LINK = $(GDC) $(DFLAGS) -o $@
diff --git a/src/catalog.d b/src/catalog.d
new file mode 100644
index 0000000..ff48a58
--- /dev/null
+++ b/src/catalog.d
@@ -0,0 +1,19 @@
+module catalog;
+
+public static class Catalog
+{
+ public static void Init(char[] p, char[] localedir)
+ {
+
+ }
+
+ public static char[] GetString(char[] s)
+ {
+ return s;
+ }
+
+ public static char[] GetPluralString(char[] s, char[] p, char[] n)
+ {
+ return s;
+ }
+}
diff --git a/src/helloworld.d b/src/helloworld.d
index f2f328b..05ed01b 100755
--- a/src/helloworld.d
+++ b/src/helloworld.d
@@ -2,9 +2,15 @@ import config;
import testlibrary;
import testshlibrary;
import std.stdio;
+import catalog;
void main(char[][] args)
{
+ // Internationalization Example
+ Catalog.Init("i18n","./locale");
+
+ writefln(Catalog.GetString("Hello!"));
+
writefln(HelloWorldFactory.getName() ~ ", " ~ HelloWorldSharedObjectFactory.getVersion() ~ " " ~ config.VERSION);
// auto type inference and built-in foreach