Changing language in Confiforms

Shivalika Sharma
Contributor
November 6, 2024

Hello,

 

Is there a way to convert my whole Confiform's language from English to French and vice-versa.

 

Please guide. 
Thank you!

2 answers

0 votes
Humashankar VJ
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 6, 2024

Hi @Shivalika Sharma 

There are multiple options that can be researched

Key Considerations

  • Custom validations should be designed in a way that they are applied based on language
  • Could be tricky to get multi-language error messages for compulsory (required) fields, as these are part of the platform or field definition.

Hope this helps - Happy to help further!!
Thank you very much and have a great one!
Warm regards

Shivalika Sharma
Contributor
November 6, 2024

Thanks so much @Humashankar VJ 
I am able to translate using Set Field Label.

Could you please help what I can leverage for translating labels for values for these fields like the drop down values or Yes/No in a radio group.

Shivalika

Like Humashankar VJ likes this
Humashankar VJ
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 6, 2024

@Shivalika Sharma 

Thank you for providing additional information. Your approach to translating field labels using Set Field Label is a great starting point. To translate dropdown values and radio group options, you can build upon this approach with some extra steps.

 

For dropdown fields, utilize the "Set field options" rule in ConfiForms Field Definition Rules. Create conditional rules based on a language selector field. For instance, define options in French when the language selector is set to French, and options in English otherwise.

Try below code 

if (form.language == 'French') {

  return [

    {value: 'option1', label: 'Option Un'},

    {value: 'option2', label: 'Option Deux'},

    // ... more options

  ];

} else {

  return [

    {value: 'option1', label: 'Option One'},

    {value: 'option2', label: 'Option Two'},

    // ... more options

  ];

}

 

Similarly, for radio groups, employ the "Set field options" rule with conditional logic based on the selected language. This allows you to display translated options.

if (form.language == 'French') {

  return [

    {value: 'yes', label: 'Oui'},

    {value: 'no', label: 'Non'}

  ];

} else {

  return [

    {value: 'yes', label: 'Yes'},

    {value: 'no', label: 'No'}

  ];

}

 

To trigger these translation rules, add a language selector field (dropdown) at the beginning of your form. This field will determine the language for other fields. 

For more complex translations or reusable text, leverage custom messages. Define messages in multiple languages and reference them in your field rules.

Lastly, don't forget to translate validation messages using the "Set validation message" rule.

Best Regards

Shivalika Sharma
Contributor
November 7, 2024

Thank you @Humashankar VJ 

But I am unable to locate 'Set Field Options' under Confiforms Field Definition Rules. Maybe you can share a screenshot. That would be a big help!

Also adding conditional logic would it come under 'Condition' field, or use it with 'Run custom JavaScript' rule.

Please advice.

 

Thank you

Shivalika

Like Humashankar VJ likes this
Humashankar VJ
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 7, 2024

Hi @Shivalika Sharma 

I see the challenge in making the “Set Field Options" rule. Instead, options for dropdowns, radio buttons, and similar fields are defined directly within the field configuration. Especially, there is no built-in rule for dynamically altering or setting field options after the form has been created This is all for your point-1.

For Point-2:

ConfiForms' "Condition" setting enables simpler conditional logic, determining when rules apply, such as field visibility or value setting based on user input.

Despite this, dynamically changing field labels is not directly supported. For complex operations, ConfiForms' "Run custom JavaScript" rule is available, but manipulating form field options, like dropdown choices, is not straightforward.

  • Translating dropdown or radio options based on language selection is challenging due to the lack of direct dynamic switching. A workaround involves creating multiple field sets, one per language, and using conditional logic to display the appropriate set.
  • For multi-language forms, setting up separate dropdown fields for each language and controlling visibility using the "Condition" setting is the most reliable approach. This provides more stability than dynamically modifying options via JavaScript.

While ConfiForms offers flexibility with conditional logic and JavaScript, it has limitations when dynamically changing field options based on user selection. Using multiple fields with visibility conditions remains the most reliable solution for language-specific option sets.

Can you also write an email to ConfiForms support to make more specific options - they may also give some generalized options,

vertuna@vertuna.com

Best Regards

Humashankar VJ
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 7, 2024

For the screenshot portion, I'll try generating some in my personal account, while verifying at present from my official account.

Hope that clarifies.

0 votes
Manoj Gangwar
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 6, 2024

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events