• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Localization of System Preferences Pane
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Localization of System Preferences Pane


  • Subject: Re: Localization of System Preferences Pane
  • From: Olivier Palliere <email@hidden>
  • Date: Tue, 10 Nov 2009 23:36:33 +0100

Hi Reinis,

First thing that comes to mind is that using English, French, German and so for your localized bundles is an old fashioned way that should not be done anymore. It does not support all languages. You must now use the iso code of the country or language you want to support.

For Latvian, it's LV, so try to crate a localizable.strings for the lv (you should end up with an lv.lproj in the app bundle).

Olivier./.
Molowa.

On Nov 10, 2009, at 10:51 PM, MacProjects wrote:

> Hello!
>
> It's first time trying to localizae a prefpane... some minutes and I'm already stuck.
> Suppose I want to deliver a preference pane with interface in English, German, Latvian, the latter beeing mostly used.
> For testing purposes:
> I'm creating a new Preference pane project under Xcode 3.2.1
>
> Creating localizations for
> InfoPlist.strings
> MyProjPref.xib
> Localizable.strings
> named English, German, Latvian
>
> In MyProjPref.xib for each language I create a Label (NSTextField) with a value that represents the corresponding language, e.g., "This is English text", "This is Deutsch text", "This is Latviešu text".
>
> In Localizable.strings I'm creating
> someword = "English word";
> someword = "Deutsch word";
> someword = "Latviešu word";
>
> and the only code is
> - (void) mainViewDidLoad
> {
> 	NSLog(NSLocalizedStringFromTableInBundle(@"someword",nil,[NSBundle bundleForClass:[self class]],nil));
> }
>
> Using OS 10.6.2.
> The Latvian language is the first language set in System Preferences : Language & Text  : "Drag languages into order you prefer" list, then comes English, then Deutsch. However firing up preference pane opens English localization nib and NSLog writes "English word".  If I change list and order Deutsch as the second language, then it fires up. Thus - Latvian in the first position is ignored and the next language is used.
> I do understand that the System Preferences.app itself isn't localized in Latvian. Is it the reason why I'm not able to use "other than apple supported system wide localisation language" in System Preferences.app prefpane?
>
> If so, what would be the solution?
>
> I.e. leaving xib unlocalized, and using code like
>
> - (void) mainViewDidLoad
> {
> 	NSUserDefaults * defaults = [NSUserDefaults standardUserDefaults];
> 	NSArray * languages = [defaults objectForKey:@"AppleLanguages"];
> 	if([[languages objectAtIndex:0] compare:@"lv"] == NSOrderedSame) {
> 		NSLog(@"Latvian!\n");
> 		//set labels value
> 		[labelField setStringValue:@"text in latvian"];
> 	}
> 		// else if en, de....
> }
>
> looks bad... I have to check for each and every field, view, layout, cell and "you know what more" in the nib that the value passed in such programmatical way isn't cropped in the element etc. which means more and more and more code. And more.
> There is no problem localizing "usual" cocoa based applications in any other language including Latvian the way Apple ment for developers to do this. What about sysprefs?
>
> Many thanks in advance,
> Regards, Reinis
>
>
> _______________________________________________
>
> Cocoa-dev mailing list (email@hidden)
>
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Localization of System Preferences Pane
      • From: MacProjects <email@hidden>
    • Re: Localization of System Preferences Pane
      • From: Nick Zitzmann <email@hidden>
References: 
 >can't get sheet to appear (From: SRD <email@hidden>)
 >Re: can't get sheet to appear (From: Kyle Sluder <email@hidden>)
 >Localization of System Preferences Pane (From: MacProjects <email@hidden>)

  • Prev by Date: Re: NSArrayController -addObjects and undo - [improved but still confused]
  • Next by Date: Re: CALayer subclass allocation problem
  • Previous by thread: Localization of System Preferences Pane
  • Next by thread: Re: Localization of System Preferences Pane
  • Index(es):
    • Date
    • Thread