PrestaShop Developer Conference
PrestaShop Developer Conference
Paris, France - November 30, 2023
Let's talk code, commerce and open source.


Class TranslatableChoiceType adds translatable choice types with custom inner type to forms. Language selection uses a dropdown.

Type options

Option Type Default value Description

Code example

$builder->add('template', TranslatableChoiceType::class, [
    'hint' => sprintf(
        $this->trans('Only letters, numbers and underscores ("_") are allowed.', 'Admin.Shopparameters.Help'),
        $this->trans('Email template for both .html and .txt.', 'Admin.Shopparameters.Help')
    'required' => false,
    'choices' => $this->templates,
    'row_attr' => $this->templateAttributes,