Skip to content

Commit a314ce0

Browse files
committed
minor #12236 [Translator] Recommending real message id for shared bundles (yceruto)
This PR was merged into the 3.4 branch. Discussion ---------- [Translator] Recommending real message id for shared bundles Using the "keyword" method to create translation message in public/shared bundles is painful sometimes, because apps with single-lenguage MUST activate the `translator` layer to see the final message, so worse performance. DX-wise, the "keyword" method is "practical" (nowaday smart IDEs can replace texts easier), but when we're creating a bundle we should also think that "translation" is optional for apps. Commits ------- 0def709 Recommending real message id for shared bundles
2 parents 6e787e9 + 0def709 commit a314ce0

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

components/translation/usage.rst

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,10 @@ recommended format. These files are parsed by one of the loader classes.
164164
read "Symfony is really great" in the default locale.
165165

166166
The choice of which method to use is entirely up to you, but the "keyword"
167-
format is often recommended.
167+
format is often recommended for multi-language applications, whereas for
168+
shared bundles that contain translation resources we recommend the real
169+
message, so you application can choose to disable the translator layer
170+
and you will see a readable message.
168171

169172
Additionally, the ``php`` and ``yaml`` file formats support nested ids to
170173
avoid repeating yourself if you use keywords instead of real text for your

0 commit comments

Comments
 (0)