Dashboard > WOProject / WOLips > ... > WOFramework > WOProject-Localization
  WOProject / WOLips Log In View a printable version of the current page.  
  WOProject-Localization
Added by Andrew Lindesay, last edited by Andrew Lindesay on Oct 24, 2006  (view change)
Labels: 
(None)

Localized Resources Handling

This has been transcribed by Andrew Lindesay from the old WOProject site.

WOApplication and WOFramework tasks must deal with resources. Resources of the applications that have a multilingual audience require localization.

In a deployed WebObjects application or framework resources are separated into "Resources" and "WebServerResources" directories. For instance WOComponents are "Resources", images are "WebServerResources", etc. Both "Resources" and "WebServerResources" require special handling of localization issues.

In WOProject tasks resources handling is normally done via nested <resources> or <wsresources> elements that specify location of the resources. WOProject adds special handling of resources that are located in directories with extension .lproj. For instance:

<woframework name="MyFramework" destDir="${dist}/Frameworks">
   <-- No localization needed -->
   <resources dir="src/resources">
       <include name="MyResources/*.wo/**"/>
   </resources>
   
   <-- Localization required, since starts with *.lproj -->
   <wsresources dir="src/frameworks/WSResources">
       <include name="*.lproj/Images/**"/>
   </wsresources>
   
   <-- No localization needed, since path starts with "Images" -->
   <-- even though it contains *.lproj in the middle           -->
   <wsresources dir="src/frameworks/WSResources">
       <include name="Images/*.lproj/**"/>
   </wsresources>
</woframework>

Here is how WOProject will handle resource copying:

WOComponents  
Not Localized Copied to the top level resources directory ignoring any subdirectories. For instance MyComponents/reusable/Comp.wo will be copied to Resources/Comp.wo.
Localized Copied to the top level resources language-specific directory ignoring any subdirectories under *.lproj. For instance English.lproj/MyComponents/reusable/Comp.wo will be copied to Resources/English.lproj/Comp.wo.
Localized, but located in Nonlocalized.lproj Copied to the top level resources directory ignoring any subdirectories. For instance Nonlocalized.lproj/MyComponents/reusable/Comp.wo will be copied to Resources/Comp.wo.
Other resources  
Not Localized Copied to the resources directory preserving subdirectories structure. For instance Other/model.eomodeld will be copied to Resources/Other/model.eomodeld.
Localized Copied to the top level resources language-specific directory preserving subdirectories structure. For instance English.lproj/Images/toolbar/i1.gif will be copied to WebServerResources/English.lproj/Images/toolbar/i1.gif.
Localized, but located in Nonlocalized.lproj Copied to the top level resources stripping "Nonlocalized.lproj", but preserving lower level subdirectories. For instance Nonlocalized.lproj/props/props.plist will be copied to Resources/props/props.plist.

Site running on a free Atlassian Confluence Open Source Project License granted to ObjectStyle. Evaluate Confluence today.
Powered by Atlassian Confluence, the Enterprise Wiki. (Version: 2.5.4 Build:#809 Jun 12, 2007) - Bug/feature request - Contact Administrators