<![CDATA[ [SOLVED] Populating the existing content to the other lang content - MODX Community Forums]]> https://forums.modx.com/thread/?thread=45451 <![CDATA[Re: [SOLVED] Re: Populating the existing content to the other lang content]]> https://forums.modx.com/thread/45451/solved-populating-the-existing-content-to-the-other-lang-content#dis-post-262964 Quote from: goldsky at Nov 13, 2009, 01:56 AM

Or, perhaps the default lang doesn’t have its separate TV and contents. It just simply an empty variable that’s (let say) hyperlinked to the ModX’s origin content.
Multilingual documents don’t use the standard document variables at all. They become redundant. Instead they use the multilingual template variables: pagetitle_{langId}, content_{langId}, etc. There is no linking of the data in the default language tvs to the data in the standard document variables - although I can see why this might be considered a good thing. It would be possible to switch the document back to monolingual and have it up to date with the default language content only.

Automatic synchronisation of the pagetitle document variable with the default language pagetitle is already implemented. Extending this to synchronise all fields shouldn’t be very difficult. I’ll add it to the list of things to do.]]>
PaulSuckling Nov 13, 2009, 08:13 PM https://forums.modx.com/thread/45451/solved-populating-the-existing-content-to-the-other-lang-content#dis-post-262964
<![CDATA[ [SOLVED] Re: Populating the existing content to the other lang content]]> https://forums.modx.com/thread/45451/solved-populating-the-existing-content-to-the-other-lang-content#dis-post-262963 Quote from: PMS at Nov 13, 2009, 12:46 AM

I’d do it as follows. Please note that this will delete any existing English and Indonesian language content, but the standard document fields will be untouched.

  • Go to Modules > YAMS > Language Settings. Make sure Id is set as the default language.
  • Go to Elements > Manage Elements > Template Variables.
  • Delete *_en (alias_en, content_en, etc.). This achieves point 2 above.
  • Delete *_Id (alias_Id, content_Id, etc.).
  • Go to Modules > YAMS > Multilingual Template and press Update. This will copy all content from your standard document fields to your Id language fields for all multilingual documents.
It works.

Quote from: PMS at Nov 13, 2009, 12:46 AM

Unfortunately, with the exception of the pagetitle there is no mechanism in YAMS for keeping the document content fields synchronised with the default language fields.
Next version, may be? grin
Or, perhaps the default lang doesn’t have its separate TV and contents. It just simply an empty variable that’s (let say) hyperlinked to the ModX’s origin content.

Quote from: PMS at Nov 13, 2009, 12:46 AM

Yes. TinyMCE is normally installed by default with MODx. You have to make sure that it is activated under Tools > Configuration > Interface & Features > Enable Editor ..., and you must also make sure that your documents have the ’Rich Text’ property selected on the Settings tab.
My bad. I used to turn this off, since RTE always break the &amp; chars. It works.

Thx for your kind help.]]>
goldsky Nov 12, 2009, 07:56 PM https://forums.modx.com/thread/45451/solved-populating-the-existing-content-to-the-other-lang-content#dis-post-262963
<![CDATA[Re: Populating the existing content to the other lang content]]> https://forums.modx.com/thread/45451/solved-populating-the-existing-content-to-the-other-lang-content#dis-post-262962 Quote from: goldsky at Nov 12, 2009, 06:16 AM

So, how to make:
1. Original document content => Id document content
2. En document content => deleted.
3. Id document content <= auto-sync => original document content
I’d do it as follows. Please note that this will delete any existing English and Indonesian language content, but the standard document fields will be untouched.

  • Go to Modules > YAMS > Language Settings. Make sure Id is set as the default language.
  • Go to Elements > Manage Elements > Template Variables.
  • Delete *_en (alias_en, content_en, etc.). This achieves point 2 above.
  • Delete *_Id (alias_Id, content_Id, etc.).
  • Go to Modules > YAMS > Multilingual Template and press Update. This will copy all content from your standard document fields to your Id language fields for all multilingual documents.

Unfortunately, with the exception of the pagetitle there is no mechanism in YAMS for keeping the document content fields synchronised with the default language fields.

Quote from: goldsky at Nov 12, 2009, 06:16 AM

BTW,
Can I use TinyMCE in YAMS?
Yes. TinyMCE is normally installed by default with MODx. You have to make sure that it is activated under Tools > Configuration > Interface & Features > Enable Editor ..., and you must also make sure that your documents have the ’Rich Text’ property selected on the Settings tab.]]>
PaulSuckling Nov 12, 2009, 06:46 PM https://forums.modx.com/thread/45451/solved-populating-the-existing-content-to-the-other-lang-content#dis-post-262962
<![CDATA[Re: Populating the existing content to the other lang content]]> https://forums.modx.com/thread/45451/solved-populating-the-existing-content-to-the-other-lang-content#dis-post-262961
When I installed the module, the default lang was English.
Then I hit the "Update" button in Multilingual Templates.
The original document contents populated into all English’s document content.

Then I realized, "ahhh... the default should be in Indonesian (Id)."
And I found out that the Id’s document contents were empty.

So, how to make:
1. Original document content => Id document content
2. En document content => deleted.
3. Id document content <= auto-sync => original document content

Quote from: PMS at Nov 12, 2009, 12:24 AM

It is possible to manually delete the template variables associated with a language (content_langid, pagetitle_langid, etc.) They can be re-created at any time by pressing submit on the Modules>YAMS>Multilingual Templates tab.
No, it doesn’t re-copy.

BTW,
Can I use TinyMCE in YAMS?]]>
goldsky Nov 12, 2009, 12:16 AM https://forums.modx.com/thread/45451/solved-populating-the-existing-content-to-the-other-lang-content#dis-post-262961
<![CDATA[Re: Populating the existing content to the other lang content]]> https://forums.modx.com/thread/45451/solved-populating-the-existing-content-to-the-other-lang-content#dis-post-262960
The intention is that when you make a template multilingual (via Modules>YAMS>Multilingual Templates) data should be copied from the standard document variables to the default language template variables (if they are empty) for the associated documents. However, this may not be working in all cases. On my list of things to do I have a note to check that this feature is working correctly. EDIT: It is working correctly. I changed the default language to French and then wondered why the English content had not been populated!

It is possible to change the default language via Modules>YAMS>Language Settings.

It is possible to manually delete the template variables associated with a language (content_langid, pagetitle_langid, etc.) They can be re-created at any time by pressing submit on the Modules>YAMS>Multilingual Templates tab.]]>
PaulSuckling Nov 11, 2009, 06:24 PM https://forums.modx.com/thread/45451/solved-populating-the-existing-content-to-the-other-lang-content#dis-post-262960
<![CDATA[ [SOLVED] Populating the existing content to the other lang content]]> https://forums.modx.com/thread/45451/solved-populating-the-existing-content-to-the-other-lang-content#dis-post-262959 Can I revert it back? Or delete? Or just populate it to the new default lang (how? i can’t find the ’button’)?
Is there any auto-sync of default’s content to modx’s general content?]]>
goldsky Nov 11, 2009, 11:36 AM https://forums.modx.com/thread/45451/solved-populating-the-existing-content-to-the-other-lang-content#dis-post-262959