[MGNLFORM-63] Magnolia Form Module does not support i18n Created: 23/Oct/10  Updated: 29/Nov/10  Resolved: 11/Nov/10

Status: Closed
Project: Magnolia Form Module
Component/s: None
Affects Version/s: 1.1.2
Fix Version/s: 1.2

Type: Improvement Priority: Minor
Reporter: Corin Moss Assignee: Ondrej Chytil
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

All


Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Date of First Response:

 Description   

The magnolia Form Module is not configured to support multiple languages (i18n.)

Modifying it to support i18n appears to be trivial, and involves setting a property of i18n to true for each control defined for the form dialogs.

Here is a short example Groovy script that does that:

hm = ctx.getHierarchyManager('config')
root = hm.getContent("/modules/form/dialogs")
root.getChildren("mgnl:contentNode").each{cn->
  cn.getChildren("mgnl:contentNode").each{cn2->
    cn2.getChildren("mgnl:contentNode").findAll{cn3->
      cn3.controlType == 'edit'
    }.each{editControl ->
      if(!editControl.i18n) {
        editControl.setNodeData('i18n', true)
        editControl.save()
      }
    }  
  }
}


 Comments   
Comment by Philipp Bärfuss [ 25/Oct/10 ]

Thanks for the helpful script. We should truly add this i18n flags to the form dialogs.

Comment by Tobias Mattsson [ 29/Nov/10 ]

Reviewed.

Generated at Mon Feb 12 05:36:30 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.