summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGravatar mszulecki2007-02-23 18:39:43 +0000
committerGravatar mszulecki2007-02-23 18:39:43 +0000
commit667123895db5adfd6515f630d0d6daa740b6576b (patch)
treef7aa932112fe75e31532549d6885bc46d2824685 /src
parente871e41637d8c511a0cf0379c5e4ca872f6cf469 (diff)
downloaddskel-667123895db5adfd6515f630d0d6daa740b6576b.tar.gz
dskel-667123895db5adfd6515f630d0d6daa740b6576b.tar.bz2
Add i18n support stubs and adjust chain.
git-svn-id: http://svn.sukimashita.com/repos/dskel/trunk@15 4281df72-ff29-0410-8fee-2d9ac0c5f5a7
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