Blair McKenzie wrote:
> Another approach to handling the content is to extend dmHTML et al so
> that body is an array of language-content items. In FC3.2 this would
> be difficult to set up an editor for, but from what I understand it
> would be relatively easy to pull off in FC4 with the new forms
> functionality. The advantages to doing it this way: 1) less confusing
> website structure, 2) easier to manage changes to structure/content.
>
> Blair
The "problem" with this approach is that if you want "localized" sites.
It's not every time you want a site translated page per page.
I've given this some toughts and one sollution might be this. We have a
default locale wich is "en_AU" for example. If we take the dmHTML as an
example. The objects which exist in the table dmHTML is of this locale.
A new table called dmHTML_translation would be created containing the
same rows that the table dmHTML does except that objectid is replaced by
"parentId" and theres an "locale" property added.
When adding translations to an object it could look like this...
<cfscript>
oTranslation = CreateObject('component','component with translation
functions');
stMyObj = StructNew();
stMyObj.parentId = objectid of parent;
stMyObj.locale = 'sv_SE'; // for Sweden / Swedish
stMyObj.title = 'translated title';
stMyObj.body = 'translated body';
oTranslation.addTranslation(stMyObj,type='dmHTML');
</cfscript>
If this functionality was in the core you could have an locale property
in fourq / getData giving you the right object directly. But we can also
add it to our "component with translation functions" and do something
like this...
<cfif SESSION.locale EQ APPLICATION.mydefaultlocale>
<cfset stObj = oHtml.getData(objectId)>
<cfelse>
<cfset oTranslation = CreateObject('component','component with
translation functions')>
<cfset stObj = oTranslation.getData(objectid,type='dmHTML')>
</cfif>
Then there's how to integrate it in the admin....
/ daniel
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"farcry-dev" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/farcry-dev?hl=en
-~----------~----~----~----~------~----~------~--~---