• 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
Localized EO
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Localized EO


  • Subject: Localized EO
  • From: Johann Werner <email@hidden>
  • Date: Thu, 12 Jul 2007 17:08:57 +0200

Hi all,

sorry to bother the list but I am stuck.

in short: I want to make some EOs behave localized.


long story: In my project I have some fixed lists as e.g. salutations that are saved in the db. There I want to use the approach of the localizable.strings lookup (I am using ERXLocalizer from WOnder). To make this process transparent I had the idea to modify the accessors of the eo to look up the value in the db and then based on the current language setting retrieve the correct localized string from the .strings file. So I would call the accessor as any other but get a result based on the used language.


For lists that are user editable I use another approach by replacing the string in the entity by a to-many relationship pointing to an eo with a localized string and a language code. So in this case the eo should get the current language setting and then choose the correct subentity from the to-many relationship and return the appropriate localized string.

Unfortunately the language settings are accessed by session ().localizer() and there is apparently no way to access the current session object from within an eo. I know I could pass the current session (or only the code for the current language) through by an argument but then I can't use bindings in components without writing intermediate access functions resulting in more unnecessary code and no transparent use of that eo would be possible.


As I am new to localization in WO I don't know if my ideas go perhaps into the wrong direction. I would be very thankfull if someone could give me a hint if the descibed approach is advisable or if there is another (more elegant) way to resolve the problem.


jw

Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
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

  • Follow-Ups:
    • Re: Localized EO
      • From: Mike Schrag <email@hidden>
    • Re: Localized EO
      • From: Jean-François Veillette <email@hidden>
    • Re: Localized EO
      • From: "Daniele Corti" <email@hidden>
  • Prev by Date: Re: EOAndQualifier order
  • Next by Date: [OT] Product Recommendations
  • Previous by thread: Re: EOAttribute.validateValue question
  • Next by thread: Re: Localized EO
  • Index(es):
    • Date
    • Thread