ios - How would you translate and localize a variable element list? -


i've got list of n people , construct sentence so:

andrea, bob, chelsea, dan , emma this.

this easy have in strings file if number of people known beforehand format 5 people this:

%@, %@, %@, %@ , %@ this.

say have variable number of people though , number of people determined @ runtime , go 15 (or more) people. how potentially translate of different cases in conventional , non-fragile way, not doing in strings file , appending translations together:

"initiallistitem" = "%@, " "midlistitem" = "%@ " "finallistitem" = "and %@ " "postludelistitem" = "like this." 

ideally define list format automatically expanded based on number of people in list, , easy translators translate. exist or there way this?


Comments

Popular posts from this blog

javascript - Thinglink image not visible until browser resize -

firebird - Error "invalid transaction handle (expecting explicit transaction start)" executing script from Delphi -

mongodb - How to keep track of users making Stripe Payments -