Re: WOResourceManager, opposite of stringForKey
Re: WOResourceManager, opposite of stringForKey
- Subject: Re: WOResourceManager, opposite of stringForKey
- From: Dev WO <email@hidden>
- Date: Tue, 4 Jul 2006 21:55:48 +0200
Hello Chuck,
On Jul 3, 2006, at 6:53 AM, Dev WO wrote:
Hi guys,
I'm probably missing something obvious, but I just don't see it...
Is there any simple way to get a key from a string? assuming the
string will be localized using the .plist method.
No. And even if there was, the best you would get is a list of
keys that match the string. Keys are unique, strings don't have to
me.
That's right, huum I didn't though about this...
I know I can compare the string I get with the string for each
language using stringForKey, but I though there's a convenient way
to get the key directly.
Why are you passing localized values to a direct action? Would it
not be better to pass the key in the URL rather than the localized
version?
search engine:), the name in the URL is very powerful, so I have no
choice but use it in the url.
I could use Apache rewrite to translate it to the correct key
internally, but it would be more difficult to maintain on the
development machine...
Chuck
I've been working on a new version of a website, with some parts
that will be multilingual.
After reading about that, I decided to go the .strings way, with
a localized .strings file (as the site isn't really dynamic).
It will be mostly DirectAction based.
So here's my question:
How can I access a key in my .strings file based on the value I got?
I mean, I know how to get the value from a key using
WOResourceManager, but I'd like to ba able to request the
opposite: the key based on (a localized) value.
That way I could make my DA more easier to maintain and a lot
more smaller than explicitly write all the possible case in every
language available.
I've red the WOResourceManager API, but without success.
Thanks for your help, have a nice sunday;)
Xavier
--
Coming sometime... - an introduction to web applications using
WebObjects and Xcode http://www.global-village.net/wointro
Practical WebObjects - for developers who want to increase their
overall knowledge of WebObjects or who are trying to solve specific
problems. http://www.global-village.net/products/
practical_webobjects
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden