Access to Localized Portions of Private Framework without having App Localized

  • Hi All,

    Kind of a strange question...  I have a private framework I've created
    for use in some projects which contains about ten different
    localizations.  When I include this framework in my application, I
    have found that the localized versions of the framework are NOT used
    unless I also have a localized version of my application in the same
    language.  For example, even though the framework contains a French
    localization, it is not used unless I also create a French
    localization of my app.

    This is less than desirable since I want to use the localized versions
    from the framework whenever possible (for its dialogs), but can't
    always localize the entire application.

    Is there a way around this?

    Thanks,

    -Ryan
  • On Dec 14, 2007, at 11:47 AM, Ryan Poling wrote:

    > Hi All,
    >
    > Kind of a strange question...  I have a private framework I've
    > created for use in some projects which contains about ten different
    > localizations.  When I include this framework in my application, I
    > have found that the localized versions of the framework are NOT used
    > unless I also have a localized version of my application in the same
    > language.  For example, even though the framework contains a French
    > localization, it is not used unless I also create a French
    > localization of my app.
    >
    > This is less than desirable since I want to use the localized
    > versions from the framework whenever possible (for its dialogs), but
    > can't always localize the entire application.
    >
    > Is there a way around this?
    >

    Yes, there is.  If you want to use the default localization
    mechanisms, you can add the key CFBundleAllowMixedLocalizations to
    your Info.plist with the value "YES", and then each bundle will be
    considered for localization individually.  If you want more specific
    control, you can use NSBundle or CFBundle API such as
    preferredLocalizationsFromArray:forPreferences:nil to select an
    appropriate localization, and then use localization-specific resource
    location APIs.

    Douglas Davidson
  • Wonderful!  Thanks Douglas!

    -Ryan

    On Dec 14, 2007, at 12:13 PM, Douglas Davidson wrote:
    >
    > Yes, there is.  If you want to use the default localization
    > mechanisms, you can add the key CFBundleAllowMixedLocalizations to
    > your Info.plist with the value "YES", and then each bundle will be
    > considered for localization individually.  If you want more specific
    > control, you can use NSBundle or CFBundle API such as
    > preferredLocalizationsFromArray:forPreferences:nil to select an
    > appropriate localization, and then use localization-specific
    > resource location APIs.
    >
    > Douglas Davidson
    >
previous month december 2007 next month
MTWTFSS
          1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
31            
Go to today