File tree Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Original file line number Diff line number Diff line change 1+ .. index ::
2+ single: Translation; Lint
3+ single: Translation; Translation File Errors
4+
5+ How to Find Errors in Translation Files
6+ =======================================
7+
8+ Symfony processes all the application translation files as part of the process
9+ that compiles the application code before executing it. If there's an error in
10+ any translation file, you'll see an error message explaining the problem.
11+
12+ If you prefer, you can also validate the contents of any YAML translation file
13+ using the ``lint:yaml `` command:
14+
15+ .. code-block :: terminal
16+
17+ # lint a single file
18+ $ ./bin/console lint:yaml app/Resources/translations/messages.en.yml
19+
20+ # lint a whole directory
21+ $ ./bin/console lint:yaml app/Resources/translations
22+
23+ # lint a specific bundle
24+ $ ./bin/console lint:yaml @AppBundle
25+
26+ The linter results can be exported to JSON using the ``--format `` option:
27+
28+ .. code-block :: terminal
29+
30+ # lint a single file
31+ $ ./bin/console lint:yaml app/Resources/translations --format=json
You can’t perform that action at this time.
0 commit comments