If you want to default your localizer to spanish in all your sessions instead
of using the value set by the browser, then in your ERXSession subclass
constructor try adding:
_localizer = ERXLocalizer.localizerForLanguage("Spanish")
That should probably work.
Ramsey
On Aug 2, 2012, at 1:55 PM, WebObjects TORAcom wrote:
> Oh, Thanks.
>
> That makes sense, I have configured my browsers to use English as main
> language.
>
> ¿Is there a way to change this behavior? Just to know.
>
> Miguel Torres.
>
>
>
>
> On 02/08/2012, at 14:00, Ramsey Gurley <[email protected]> wrote:
>
>> I may be mistaken, but I believe it respects whatever default is set on the
>> browser for each session.
>>
>> Ramsey
>>
>> On Aug 2, 2012, at 11:56 AM, WebObjects TORAcom wrote:
>>
>>> Hi list,
>>>
>>> I am testing ERXLocalizer, it seems very good.
>>>
>>> I want Spanish as the default language for my app, so I set the Properties
>>> file like this:
>>>
>>> er.extensions.ERXLocalizer.defaultLanguage=Spanish
>>> er.extensions.ERXLocalizer.fileNamesToWatch=("Localizable.strings","ValidationTemplate.strings")
>>> er.extensions.ERXLocalizer.availableLanguages=(Spanish, English)
>>> er.extensions.ERXLocalizer.frameworkSearchPath=(app,ERDirectToWeb,ERExtensions)
>>>
>>> I also have the Spanish.lproj and English.lproj folders inside Resources
>>> directory and a Localizable.strings inside each one.
>>>
>>> This is the content of the English.lproj/Localizable.strings file:
>>>
>>> {
>>> "login_username" = "Username";
>>> "login_password" = "Password";
>>> }
>>>
>>> This is the content of the Spanish.lproj/Localizable.strings file:
>>>
>>> {
>>> "login_username" = "Usuario";
>>> "login_password" = "Contraseña";
>>> }
>>>
>>>
>>> I am testing with one wostring configured like this:
>>> wostrUserNameLabel : WOString {
>>> value = session.localizer.login_username;
>>> }
>>>
>>>
>>> I think every thing is well configured but when I run the App always shows
>>> the english label.
>>>
>>> Am I missing something?
>>>
>>> Thanks in advance.
>>>
>>> Miguel Torres.
>>>
>>>
>>>
>>>
>>> _______________________________________________
>>> Do not post admin requests to the list. They will be ignored.
>>> Webobjects-dev mailing list ([email protected])
>>> Help/Unsubscribe/Update your Subscription:
>>> https://lists.apple.com/mailman/options/webobjects-dev/rgurley%40smarthealth.com
>>>
>>> This email sent to [email protected]
>>
>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Webobjects-dev mailing list ([email protected])
> Help/Unsubscribe/Update your Subscription:
> https://lists.apple.com/mailman/options/webobjects-dev/rgurley%40smarthealth.com
>
> This email sent to [email protected]
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list ([email protected])
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com
This email sent to [email protected]