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

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

spring cloud - How to configure SpringCloud Eureka instance to point to https on non standard port -

javascript - Bootstrap Popover: iOS Safari strange behaviour -