Skip to content

Symfony 7: I18n

Setup

composer require symfony/translation
composer require nikic/php-parser

Usage

# when creating new catalogue or installing a bundle that contains translations.
syc cache:clear
# lint
syc lint:yaml translations

# inspect
syc debug:translation hu --domain=messages+intl-icu

# show messages that should be translated
syc translation:extract --dump-messages hu

# update translation files with missing strings
syc translation:extract --format=yaml --force hu

Set locale from request