I think the solution is half done, except for the limitation when it comes to run a standard snippet. Because it seems to me that some of the snippet is accessing the mysql database directly. To implement this solution; first, you might want to make sure what type of snippet that you’re going to use; second, you need to make sure each snippets that are to be use is using standard public API; third, we need to make some modfication of the current API, by hacking into document.parser and modify the getParent API and etc, so that it will work the same way with the multi-lingual hack that madmage did.
So far I can’t seem to find any easy solution to this, other than using TV and snippet to generate the desired TV, other than content. The only kinda deal that still in the process is having the TV to output the snippet, chunk, and placeholder to be parsed by the system.
Ehmm... I have another idea I guess. Let me think of this first. But I think we can add another MODx variable, for example [?content?]. So basically before everything get parsed, we need to create another parser to run first under plugin on "OnLoadWebDocument" to parse this tag and return either the desired translation TV or just the original content. Basically if I’m not mistaken, all chunk, snippet and placeholder inside TV will be parsed by the system right?
What do you guys think?
Quote from: wendy at Jan 18, 2006, 08:25 AMI think the solution is half done, except for the limitation when it comes to run a standard snippet. Because it seems to me that some of the snippet is accessing the mysql database directly. To implement this solution; first, you might want to make sure what type of snippet that you’re going to use; second, you need to make sure each snippets that are to be use is using standard public API; third, we need to make some modfication of the current API, by hacking into document.parser and modify the getParent API and etc, so that it will work the same way with the multi-lingual hack that madmage did.
Again, I am no coder but the concept sure is clear enough. But IMHO you shouldn’t have to hack documentparser, it should either be upgraded with multi-lingual capabilities or allow a module or plugin to give it multi-lingual capabilities (remember the modularity principle of MODx)... But I don’t know if it could easily be done.
Quote from: wendy So far I can’t seem to find any easy solution to this, other than using TV and snippet to generate the desired TV, other than content. The only kinda deal that still in the process is having the TV to output the snippet, chunk, and placeholder to be parsed by the system.
As long as we lack a language field for content (exactly what madmage has done), we will have problems... As for snippets, they probably would need some kind of language setting also. Instead of translating snippets, we could localize them. I don’t know if this would make things too heavy though...
Quote from: wendyEhmm... I have another idea I guess. Let me think of this first. But I think we can add another MODx variable, for example [?content?]. So basically before everything get parsed, we need to create another parser to run first under plugin on "OnLoadWebDocument" to parse this tag and return either the desired translation TV or just the original content. Basically if I’m not mistaken, all chunk, snippet and placeholder inside TV will be parsed by the system right? What do you guys think?
Can’t anwser here, but I very much like this concept of yours !
.: COO - Commerce Guys - Community Driven Innovation :.
MODx est l'outil id
I’ll work on this, as soon as I get this 3 projects in front of me done ASAP, which includes calendar and newsletter snippet that I just released in beta state.
Hope it done ASAP, so I can start working on this.
Isn’t madmage working on this already ?
Not sure I am following here ??
.: COO - Commerce Guys - Community Driven Innovation :.
MODx est l'outil id
I know he has done a hack, but I was thinking this was being turned into a module : is it not ?
.: COO - Commerce Guys - Community Driven Innovation :.
MODx est l'outil id
That would be nice, since it’s another much expected feature... I PM’ed him about this but no reply yet, probably busy ! I have some answers, things are in the hopper madmage is working on this.
.: COO - Commerce Guys - Community Driven Innovation :.
MODx est l'outil id