Welcome to Soft32 Forums!
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

Localizing a program

 
   Soft32 Home -> Mac -> Programmer Help RSS
Next:  PackageMaker install problem (/usr/local/lib).  
Author Message
Jim Schimpf

External


Since: Jun 28, 2003
Posts: 157



(Msg. 1) Posted: Sun Oct 05, 2003 1:24 pm
Post subject: Localizing a program
Archived from groups: comp>sys>mac>programmer>help (more info?)

I'm localizing a Cocoa program and part of that is building a
Localizable.strings file with an English version. This contains
strings that are part of the program in the code like button labels
that change and format strings for stringWithFormat methods. I am
using PB 2.1 December 2002 and everything was working. Suddenly one
of these string key/value pairs stops working. That is it will not be
found. I use the key and it's not found in the bundle. The others
are but this particular one is not.

I have attempted a number of things, cleaning the project and
re-building no change. Changing the key still nothing, re-arranging
the Localizable.strings file and still nothing. I have replaced the
macro NSLocalizedString() with the actual method calls and again no
change, the value just is not found. As I said the other string
key/value pairs still work but this one does not.

Any suggestions of other things to try ?

--jim
`
Back to top
Login to vote
Eric Albert

External


Since: Jun 28, 2003
Posts: 201



(Msg. 2) Posted: Sun Oct 05, 2003 3:26 pm
Post subject: Re: Localizing a program [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

In article <5d6ed6b4.0310051724.300d3bdf RemoveThis @posting.google.com>,
vze35xda RemoveThis @verizon.net (Jim Schimpf) wrote:

> I'm localizing a Cocoa program and part of that is building a
> Localizable.strings file with an English version. This contains
> strings that are part of the program in the code like button labels
> that change and format strings for stringWithFormat methods. I am
> using PB 2.1 December 2002 and everything was working. Suddenly one
> of these string key/value pairs stops working. That is it will not be
> found. I use the key and it's not found in the bundle. The others
> are but this particular one is not.
>
> I have attempted a number of things, cleaning the project and
> re-building no change. Changing the key still nothing, re-arranging
> the Localizable.strings file and still nothing. I have replaced the
> macro NSLocalizedString() with the actual method calls and again no
> change, the value just is not found. As I said the other string
> key/value pairs still work but this one does not.
>
> Any suggestions of other things to try ?

This is often caused by a missing semicolon at the end of the line in
the .strings file, by missing quotation marks on the right or left side
of the '=' sign, or by having the wrong text for the key. Double-check
all of those and you'll hopefully find the problem.

-Eric

--
Eric Albert ejalbert RemoveThis @stanford.edu
http://rescomp.stanford.edu/~ejalbert/
Back to top
Login to vote
Frederick Cheung

External


Since: Aug 23, 2003
Posts: 275



(Msg. 3) Posted: Mon Oct 06, 2003 8:07 am
Post subject: Re: Localizing a program [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On Sun, 5 Oct 2003, Eric Albert wrote:

> In article <5d6ed6b4.0310051724.300d3bdf.DeleteThis@posting.google.com>,
> vze35xda.DeleteThis@verizon.net (Jim Schimpf) wrote:
>
> > I'm localizing a Cocoa program and part of that is building a
> > Localizable.strings file with an English version. This contains
> > strings that are part of the program in the code like button labels
> > that change and format strings for stringWithFormat methods. I am
> > using PB 2.1 December 2002 and everything was working. Suddenly one
> > of these string key/value pairs stops working. That is it will not be
> > found. I use the key and it's not found in the bundle. The others
> > are but this particular one is not.
> >
> > I have attempted a number of things, cleaning the project and
> > re-building no change. Changing the key still nothing, re-arranging
> > the Localizable.strings file and still nothing. I have replaced the
> > macro NSLocalizedString() with the actual method calls and again no
> > change, the value just is not found. As I said the other string
> > key/value pairs still work but this one does not.
> >
> > Any suggestions of other things to try ?
>
> This is often caused by a missing semicolon at the end of the line in
> the .strings file, by missing quotation marks on the right or left side
> of the '=' sign, or by having the wrong text for the key. Double-check
> all of those and you'll hopefully find the problem.
>
And also things like carriage returns etc. in the middle of a string. You
may also need to check your whole file for these, as often whatever loads
the .strings file will give up at the first mistake it finds.

Fred
Back to top
Login to vote
Jim Schimpf

External


Since: Jun 28, 2003
Posts: 157



(Msg. 4) Posted: Tue Oct 07, 2003 4:53 am
Post subject: Re: Localizing a program [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Frederick Cheung <fglc2.TakeThisOut@srcf.DUH.ucam.org> wrote in message news:<Pine.LNX.4.44.0310061306160.19512-100000.TakeThisOut@kern.srcf.societies.cam.ac.uk>...
> On Sun, 5 Oct 2003, Eric Albert wrote:
>
> > In article <5d6ed6b4.0310051724.300d3bdf.TakeThisOut@posting.google.com>,
> > vze35xda.TakeThisOut@verizon.net (Jim Schimpf) wrote:
> >
> > > I'm localizing a Cocoa program and part of that is building a
> > > Localizable.strings file with an English version. This contains
> > > strings that are part of the program in the code like button labels
> > > that change and format strings for stringWithFormat methods. I am
> > > using PB 2.1 December 2002 and everything was working. Suddenly one
> > > of these string key/value pairs stops working. That is it will not be
> > > found. I use the key and it's not found in the bundle. The others
> > > are but this particular one is not.
> > >
> > > I have attempted a number of things, cleaning the project and
> > > re-building no change. Changing the key still nothing, re-arranging
> > > the Localizable.strings file and still nothing. I have replaced the
> > > macro NSLocalizedString() with the actual method calls and again no
> > > change, the value just is not found. As I said the other string
> > > key/value pairs still work but this one does not.
> > >
> > > Any suggestions of other things to try ?
> >
> > This is often caused by a missing semicolon at the end of the line in
> > the .strings file, by missing quotation marks on the right or left side
> > of the '=' sign, or by having the wrong text for the key. Double-check
> > all of those and you'll hopefully find the problem.
> >
> And also things like carriage returns etc. in the middle of a string. You
> may also need to check your whole file for these, as often whatever loads
> the .strings file will give up at the first mistake it finds.
>
> Fred

Such a goof I am... I found that I had misspelled the name of
Localizable.strings the original file. I don't know how it seemed to
work originally but it did. Anyway correcting the spelling fixed the
problem. Also for those new to it, the file Localizable.strings can
have either // single line comments or /* multiline */ comments.

--jim
Back to top
Login to vote
Display posts from previous:   
       Soft32 Home -> Mac -> Programmer Help All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You can edit your posts in this forum
You can delete your posts in this forum
You can vote in polls in this forum

Categories:
 Windows
 Linux
  Mac
 PDA


[ Contact us | Terms of Service/Privacy Policy ]