summaryrefslogtreecommitdiff
path: root/endless/hello.c
diff options
context:
space:
mode:
authorP. F. Chimento <philip.chimento@gmail.com>2013-04-07 04:19:32 +0200
committerP. F. Chimento <philip.chimento@gmail.com>2013-04-17 17:15:52 +0200
commit89671a4914caf1e20ea20a19c6bff7a058ebb3c4 (patch)
treea99b4544f888cfe6b6bbf99c4e0519117d40e89d /endless/hello.c
parent408f93ec2327a8647030139a2e6f295e8b2c8de1 (diff)
Internationalize the shared library
Add infrastructure for translating the single string in the shared library. [#1]
Diffstat (limited to 'endless/hello.c')
-rw-r--r--endless/hello.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/endless/hello.c b/endless/hello.c
index 1db6f90..83be05a 100644
--- a/endless/hello.c
+++ b/endless/hello.c
@@ -1,7 +1,9 @@
/* Copyright 2013 Endless Mobile, Inc. */
+#include <config.h>
#include <string.h>
#include <glib.h>
+#include <glib/gi18n-lib.h>
#include <gio/gio.h>
#include <endless/endless.h>
@@ -29,7 +31,7 @@ gboolean
eos_hello_sample_function(GFile *file,
GError **error)
{
- char hello_string[] = "Hello, world!\n";
+ char *hello_string = _("Hello, world!\n");
GFileOutputStream *stream;
ssize_t write_count;
gboolean success;
@@ -66,4 +68,3 @@ eos_hello_sample_function(GFile *file,
return TRUE;
}
-