summaryrefslogtreecommitdiff
path: root/src/lib/edje/edje_text.c
diff options
context:
space:
mode:
authorkatpavalli <katpaga.a@samsung.com>2015-06-01 17:38:04 +0200
committerCedric BAIL <cedric@osg.samsung.com>2015-06-01 17:50:02 +0200
commitff1184df2eecdc2f1e1fe9b9711fa1423debbd5f (patch)
treefb0ca8a7f0f2efd2cc5f040b4181816cda02f6a1 /src/lib/edje/edje_text.c
parentcae31f824a8508c4ff44b921c326aead5891f6cf (diff)
edje: add ability to change the language on one specific edje object.
Summary: Add a new property to edje_object.eo for setting the language on one Edje_Object. Test Plan: Test Code to test this implementation is done as part of efl/src/examples/edje/edje-text.c and efl/src/examples/edje/text.edc edje_cc -md <dir path>/efl/src/examples/edje/ text.edc && gcc -o edje-text edje-text.c `pkg-config --libs --cflags ecore-evas edje evas ecore eo` ./edje-text 1) Click On the text "Click here" The language gets changed as per the specific edje object. 2) Click on the text object at bottom. "Click here" The system language gets changed and the below two edje objects language are changed globally. Reviewers: cedric, shilpasingh Subscribers: poornima.srinivasan, govi, rajeshps, cedric Differential Revision: https://phab.enlightenment.org/D2559 Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
Diffstat (limited to 'src/lib/edje/edje_text.c')
-rw-r--r--src/lib/edje/edje_text.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/lib/edje/edje_text.c b/src/lib/edje/edje_text.c
index 27a9ca7..a39d52c 100644
--- a/src/lib/edje/edje_text.c
+++ b/src/lib/edje/edje_text.c
@@ -48,8 +48,10 @@ _set_translated_string(Edje *ed, Edje_Real_Part *ep)
48 snprintf(p, sizeof(p), "%s-%s", ed->file->fid, domain); 48 snprintf(p, sizeof(p), "%s-%s", ed->file->fid, domain);
49 49
50 curlocale = setlocale(LC_ALL, ""); 50 curlocale = setlocale(LC_ALL, "");
51 curpath = bindtextdomain(p, _edje_cache_path); 51 if (ed->language)
52 setlocale(LC_ALL, ed->language);
52 53
54 curpath = bindtextdomain(p, _edje_cache_path);
53 text = dgettext(p, text); 55 text = dgettext(p, text);
54 56
55 bindtextdomain(p, curpath); 57 bindtextdomain(p, curpath);