How to use the @webiny/app-i18n/components.I18NValue function in @webiny/app-i18n

To help you get started, we’ve selected a few @webiny/app-i18n examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github webiny / webiny-js / examples / packages / theme / src / layouts / forms / fields / Input.js View on Github external
// See https://reactjs.org/docs/events.html#event-pooling.
            e.persist();
            validate();
        }
    };

    return (
        <div>
            <label>
                
            </label>
            <input> onChange(e.target.value)}
                value={value}
                placeholder={I18NValue(props.field.placeholderText)}
                type={props.type}
                name={props.field.fieldId}
                id={props.field.fieldId}
                className="webiny-pb-form-field__input"
            /&gt;
            }
            /&gt;
        </div>
    );
};
github webiny / webiny-js / packages / app-forms / src / components / Form / FormRender.js View on Github external
return async value => {
                            let isInvalid = true;
                            try {
                                const result = await validatorPlugin.validator.validate(
                                    value,
                                    item
                                );
                                isInvalid = result === false;
                            } catch (e) {
                                isInvalid = true;
                            }

                            if (isInvalid) {
                                throw new Error(
                                    I18NValue({ value: item.message }) || "Invalid value."
                                );
                            }
                        };
                    })
github webiny / webiny-js / packages / app-forms / src / admin / plugins / formDetails / formSubmissions / FormSubmissionsList / FormSubmissionDialog.js View on Github external
const getFieldValueLabel = (field, value) => {
    if (field.options.length > 0) {
        const selectedOption = field.options.find(option => option.value === value);
        if (selectedOption) {
            return I18NValue(selectedOption.label);
        }
    }

    return value;
};

@webiny/app-i18n

[![](https://img.shields.io/npm/dw/@webiny/app-i18n.svg)](https://www.npmjs.com/package/@webiny/app-i18n) [![](https://img.shields.io/npm/v/@webiny/app-i18n.svg)](https://www.npmjs.com/package/@webiny/app-i18n) [![code style: prettier](https://img.shield

MIT
Latest version published 2 days ago

Package Health Score

78 / 100
Full package analysis

Similar packages