ios - Override a base localizable.strings file -
is there way have 1 base localizable.strings file multiple targets within project, , have second localizable.string file each target override , append individual values base file?
edit
i want app have 2 .strings files - localizable.string , override.strings. if string, title.welcome, not found in overridelocalizable.strings app search localizable.strings title.welcome. essentially, specifying localizable fallback, using overridelocalizable.strings default.
here solution found:
nsstring *psilocalizedstring(nsstring *key, nsstring *comment) { return nslocalizedstringwithdefaultvalue(key, @"overridelocalizable", [nsbundle mainbundle], nslocalizedstring(key, nil), comment); }
what search file called overridelocalizable.strings
key
. if value key
not found in overridelocalizable.strings
, search localizable.strings
key
. nslocalizedstring(key, nil)
default search localizable.strings
pretty simple , elegant solution
Comments
Post a Comment