ios - NSLocalized Creating a varying string from strings file -
i have string hold varying part in middle according cases.
example: lost 255 points.
the point value "255" varying part , want hold non-varying part in string file. don't want have 2 entries in strings file like.
"string_start" = "you lost" "string_end" = "points."
btw points part (255) in example nsmutableattributedstring support different color , font style.
thanks in advance.
i this:
[nsstring stringwithformat:nslocalizedstring(@"you lost %d points", nil), 255]
and localize @"you lost %d points"
in whatever language want.
Comments
Post a Comment