• 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: Problem adding .lproj folders to xcode projecjt
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Problem adding .lproj folders to xcode projecjt


  • Subject: RE: Problem adding .lproj folders to xcode projecjt
  • From: "Ando Sonenblick" <email@hidden>
  • Date: Fri, 2 Sep 2005 10:53:03 -0700
  • Thread-topic: Problem adding .lproj folders to xcode projecjt

James,

Thanks for your help, but I'm afraid I'm still stuck.

What I have is my project (a bundle) and I want to add to it four sets
of resources (project.nib and Localizable.string) for English, French,
Japanese and German.

I want to add all four sets to the project such that when I build the
bundle I get something like this, as you would expect:

productname.bundle
   Contents
      Resources
        English.lproj
            Project.nib
		Localizable.string
        German.lproj
            Project.nib
		Localizable.string
        Japanese.lproj
            Project.nib
		Localizable.string
        French.lproj
            Project.nib
		Localizable.string


I tried following your instructions.  For example, I added the two
English resources to the project.  They are added both to the "files"
portion of the project plus to the "Copy Bundle Resources" phase of the
target.   I did a "Get Info" on them.  They already where said to be in
the "English" localization.

If I build at this point I incorrectly get:

productname.bundle
   Contents
      Resources
        Project.nib
	  Localizable.string


I do NOT get the English.lproj folder.  I suppose that this layout may
function properly, but I still wanted/expected the English.lproj folder.

Continuing, I then add the French files.  They are added similarly, and
I Get Info on them and they already claim to be in a French
localization.

Excellent, so I build again.  I now get:

productname.bundle
   Contents
      Resources
        Project.nib
	  Localizable.string

Not only are the expected English.lproj and French.lproj folders not
present but only one set of the resources are present - evidently the
English ones get copied in and then the French ones copied in but
overwrite the English ones.

So obviously I'm still doing something wrong.  Can you tell me?

Thx
Ando



-----Original Message-----
From: James Bucanek [mailto:email@hidden]
Sent: Thursday, September 01, 2005 6:27 PM
To: Ando Sonenblick
Cc: email@hidden
Subject: Re: Problem adding .lproj folders to xcode projecjt

Ando Sonenblick wrote on Thursday, September 1, 2005:

>Gang,
>
>I have an xcode "Bundle" project and I'm trying to add a few .lproj
>folders to it.

I'm not entirely sure what you're trying to accomplish, but I'm sure
you're going about it the wrong way.

The .lproj folders represent localizations of files. You never "add"
.lproj folder to an Xcode project. .lproj folders are using intenally to
organized localized files.

Not knowing what you're trying to do, I'll punt and tell you how to do
what I think you want to do.

Start with a source file in a project folder: any.nib

    Project/
      any.nib

Open the Info window or Inspector palette and localize it. any.nib will
be moved into an .lproj subfolder for the development region.

    Project/
      English.lproj/
        any.nib

Now go back to the Info window and add a French localization to any.nib.
You'll now have two .lproj folders.

    Project/
      English.lproj/
        any.nib
      French.lproj/
        any.nib

>From here, manually replace the localized version of either any.nib with
some copy that you already have.

Alternative method.

Start with a single file localized for English.

    Project/
      English.lproj/
        any.nib

Now manually copy a French.lproj folder containing that same file from
some other source.

    Project/
      English.lproj/   <-- created by Xcode
        any.nib
      French.lproj/    <-- you copied this here
        any.nib

Now go and add a localization for French to that file. Xcode recognizes
that the localized version already exists and simply adopts it,
unchanged.

--
James Bucanek


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • RE: Problem adding .lproj folders to xcode projecjt
      • From: James Bucanek <email@hidden>
  • Prev by Date: Re: Can we make "solutions" with XCode?
  • Next by Date: Re: Xcode Events for External Editors
  • Previous by thread: Re: Problem adding .lproj folders to xcode projecjt
  • Next by thread: RE: Problem adding .lproj folders to xcode projecjt
  • Index(es):
    • Date
    • Thread