• Resolved Marin Marinov

    (@mpmarinov)


    Hello,

    how can I change the language for this plugin. It only shows English, although I have adapted the *.pot file so that I can translate it with “Loco Translate”. Nevertheless the strings are not translated. It only shows in English.

    Thank you.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author codepeople

    (@codepeople)

    Hello @mpmarinov

    Thank you very much for using our plugin. Every text in the forms is entered through its settings. The fields’ labels, instructions for the users, form title, and description, are entered through the controls settings and the “Form Settings” tab. The common texts, like error messages, buttons labels, captcha label, and others are entered through the “Define Text” (https://cff.dwbooster.com/documentation#texts-section) and “Validation Settings” (https://cff.dwbooster.com/documentation#validation-settings) sections in the form settings.

    However, if you want to create a multilanguage form, you can install the “Multilanguage For Calculated Fields Form” complementary plugin:

    https://cff-bundles.dwbooster.com/product/multilanguage

    Best regards.

    Thread Starter Marin Marinov

    (@mpmarinov)

    Hello,

    I mean the following texts: Severe Thinness, Moderate Thinness, Mild Thinness, Normal Overweight, Obese Class I – III etc.
    There is the possibility to show the above texts and not a number as a result, but they are only in English. The website is in Bulgarian.
    Not everyone knows English of course. Therefore I would like to adapt it…

    Thank you.

    Plugin Author codepeople

    (@codepeople)

    Hello @mpmarinov

    Thank you very much for the clarification. You are referring to the operations in the “CFF Fitness and Health Operations” complementary plugin, not the Calculated Fields Form. In this case, I recommend to include a function for the translation on your form.

    You can insert an “HTML Content” field in the form with a function similar to the following one as its content (I’m sorry, I used a translator for Bulgarian texts):

    <script>
    function my_translator(v) {
    switch(v){
    case 'Severe Thinness': return 'Тежка тънкост';
    case 'Moderate Thinness': return 'Умерена тънкост';
    case 'Mild Thinness': return 'Лека тънкост';
    case 'Normal': return 'Нормален';
    case 'Overweight': return 'Наднормено тегло';
    case 'Obese Class I': return 'Затлъстяване клас I';
    case 'Obese Class II': return 'Затлъстяване клас II';
    case 'Obese Class III': return 'Затлъстяване клас III';
    }
    return v;
    }
    </script>

    And call it from your equation:

    my_translator(BMI(fieldname1, fieldname2, true));

    But note the BMI operation returns the textual result if you pass true as its third paratmeter.

    Best regards.

    Thread Starter Marin Marinov

    (@mpmarinov)

    Hello,

    Thank you very much. It works.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Fitness and Health Operations’ is closed to new replies.