xml - gender-dependent locale String resources Android -


i'm implementing app in hebrew, , user-friendly in such way @ first time user logs on, there question "are male or female?". after answering question, want of strings gender-dependent

(e.g. in hebrew question "would coffee?" be

תרצה לשתות קפה? 

for male, , -

תרצי לשתות קפה? 

for female)

meanwhile app supports english , unisex-hebrew locales, i'm using string resources (like r.string.somevalue) , know how handle values-he , values-en.

let's can ask is_male() , is_locale_hebrew() @ anytime, saw this answer won't case since there hell lot of strings in working-already app , want solution add xml files (hopefully) less needed change in "activity"s code. thought maybe overloading parser looks xml files magic, have no clue start from.

my question divides 2 parts:

a. how can implement gender-dependnt string-resources?

b. (opt) of string-resources unisex right now, there option avoid copying resources 2 new gender-dependent files , just add default behavior of "if don't find string resource @ values-he-male search in values-he"?

thanks in advance!

re'em

same question me. plan have (in addition default string.xml in english) iw (for male) , iw_fe (for female). when user selects his/her gender, change locale (set locale programmatically )

as using default values in hebrew, still clueless. copy hebrew xml , change required entries, leaving rest intact.

hth noam


Comments

Popular posts from this blog

sql - VB.NET Operand type clash: date is incompatible with int error -

SVG stroke-linecap doesn't work for circles in Firefox? -

python - TypeError: Scalar value for argument 'color' is not numeric in openCV -