I did following to localise the strings. I wrote the following in .strings file:
"Hello"="Hello";
and in french , .strings file:
"Hello"="bonjour";
and I change the label as :
self.myLabel.text = NSLocalizedString(@"Hello", nil);
I am succesfull upto here. I have two cases:
Consider the number 2.5, where in english system it is 2.5
and in french system it is 2,5
.
How can I localise the numbers?
Edit: I used the property NSLocale, but I am unable to format the resulted number into string.
Here is what I get after converting into string:
NSString *localizedDecimalString = [NSString localizedStringWithFormat:@"%f",distance];
result is 7 324,253011 //which is ok
and I want to append km at the end, so I tried to convert it back into double:
double newlyChangedNumber = [localizedDecimalString doubleValue];
result is 7.0 //I should get 7324253011 here
How I can get something like 7 324,25 km?