objective c - IOS 8.1 localization not working,only show key not value -


first of all,i did follow site http://www.raywenderlich.com/64401/internationalization-tutorial-for-ios-2014

i create new localizable.strings file,and localize ,then add english , japanese support.

i edit localizable.strings(en) file follow:

"apptitle" = "calibrate";

i edit localizable.strings(ja) file follow:

"apptitle" = "こんにちわ";

at source code,the code : self.title = @"pianodisc calibrate"; instead of : self.title = nslocalizedstring(@"apptitle", nil);

then run it,but "apptitle" not "こんにちわ";

my environment ipad mini,ios 8.1 system,xcode 7 or 6.4. i'm searched long time on stackoverflow,like nslocalizedstring retrieves key, not value in localizable.strings (ios) ,i have tried answer,but still not work. there info,i use follow code,

nsstring *path = [[nsbundle mainbundle] pathforresource:@"ja" oftype:@"lproj"]; nslog(@"!!!!!!!!!!!!!!!!%@",path);

sometimes null,sometimes true path.

what i'm missing? anyway!

i resolved it. guy remind "check haven't somehow messed build rules (xcode 4 -> select target -> tab "build rules") there, check if don't have many "copystringsfile" rules aren't using "copystringsfile". if can remove them one." step resolve problem,thanks god.


Comments

Popular posts from this blog

How to show in django cms breadcrumbs full path? -

php - Invalid Cofiguration - yii\base\InvalidConfigException - Yii2 -

ruby on rails - npm error: tunneling socket could not be established, cause=connect ETIMEDOUT -