SOLVED - Was: Localization w/ parameters
SOLVED - Was: Localization w/ parameters
- Subject: SOLVED - Was: Localization w/ parameters
- From: Frédéric BLANC <email@hidden>
- Date: Tue, 7 Jan 2003 00:07:20 +0100
Problem: Find a Java substitute to the NSString's stringWithFormat:
facility to localize strings which depend on dynamic content.
Ex. : "This folder contains %d items." = "Ce dossier contient %d
iliments.";
Solution:
1) Use the following key/value (which kind of breaks the preferred
Cocoa model) :
"This folder contains {0,number,integer} items." = "Ce dossier contient
{0,number,integer} iliments.";
2) Use the java.text.MessageFormat class to inject the right formatted
data at runtime through one of its format() methods.
Thanks to everyone who helped.
- Fred
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.