To edit or add content to this Wiki, you can simply create a new account at http://wocommunity.org/account.
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 |
Localized |
Copied to the top level resources language-specific directory ignoring any subdirectories under |
Localized, but located in Nonlocalized.lproj |
Copied to the top level resources directory ignoring any subdirectories. For instance |
Other resources |
|
---|---|
Not Localized |
Copied to the resources directory preserving subdirectories structure. For instance |
Localized |
Copied to the top level resources language-specific directory preserving subdirectories structure. For instance |
Localized, but located in Nonlocalized.lproj |
Copied to the top level resources stripping "Nonlocalized.lproj", but preserving lower level subdirectories. For instance |