4D v11 SQL Resources Architecture
[These are notes from 4D Summit 2008.]
Presenter: Jesse Pina
Resources are now defined as files needed to translate an interface. Can be images or text. Everything is file based.
Converting from resource fork resources to file based resources
- Strings -> XLIF
- Images -> files
- Constants -> plugins
- 4D & System - > do not use
You can refer to xliff strings by IDs or names...
- :15000,1
- :xliff:elementName
You can override titles on objects on forms by specifying a resname on a xliff group that is the name of the table "[TableName]"
Which language gets loaded?
- First looks at OS language and if you have resources for that language, it uses that
- If not, then uses language resources for the version of 4D that you're using
- If not, then English
- If not, then first valid lproj folder it finds
If you want to override the language, then have multiple xliff files per language with each file having one language, and each language using different group IDs. Then use an interprocess variable for the group ID and refer to the resource by ID rather than name.
If you pull in a picture from a localized folder and then remove the directory from path it will use the file localized for the particular user.
Constants are moving to a plugin. They're providing "User Constants.bundle". It's still using the old resource fork.
If you make changes on the client side in client/server you need to use the resource explorer for it to replicate up to server.
As far as when things are replicated in client/server. You have an option to not push until next login (never), two minutes after the change (always), or if the client wants to accept the new resource (ask).
Tags: 4D Summit 2008, 4D-v11
Categories: 4D