sql
html
iphone
css
xml
ajax
python
mysql
database
xcode
objective-c
json
perl
oracle
tsql
delphi
apache
mvc
postgresql
dom
For just changing text labels I did something like this
+(void) replaceTextWithLocalizedTextInSubviewsForView:(UIView*)view { for (UIView* v in view.subviews) { if (v.subviews.count > 0) { [self replaceTextWithLocalizedTextInSubviewsForView:v]; } if ([v isKindOfClass:[UILabel class]]) { UILabel* l = (UILabel*)v; l.text = NSLocalizedString(l.text, nil); } if ([v isKindOfClass:[UIButton class]]) { UIButton* b = (UIButton*)v; b.titleLabel.text = NSLocalizedString(b.titleLabel.text, nil); } } }
call this function in your viewDidLoad: like this:
viewDidLoad:
[[self class] replaceTextWithLocalizedTextInSubviewsForView:self.view];
It saved me a lot of work declaring and connecting IBOutlets when all you want is localized labels.
you can automate a lot of it with ibtool. this is a decent introduction: http://www.bdunagan.com/2009/03/15/ibtool-localization-made-easy/
ibtool
Every place I look says that you have to replicate the entire xib file for each localization instance, even though you really only wanted to rip the text out and replicate the text in a different language for each localization instance.
If anyone knows of a method to replicate only the user visible text of an xib (in a different language) without replicating the entire xib file for each language, please let us know.