Hey there. You should add the no translate attribute to your symfony documentation. Otherwise google will translate them which results into false code.

馃憤 I'm going to fix this. Thanks for reporting it.
I've checked this issue a bit and we have two possible solutions:
<meta name="google" content="notranslate" /> tag to prevent translating the entire page (reference)<code> and <pre>. This requires to add a class="notranslate" to all of these elements (reference)I'd like to read some opinions about this from the community. Thanks!
Definitely solution 2 for me. If people want to translate the documentation text, I think they should be free to do so, we just have to prevent that the code examples are translated.
I agree with @WouterJ.
We can close this as "fixed" because this feature has been added to the private Sphinx renderer used to generate Symfony Docs. <code> and < pre> elements will now include class="notranslate". We just need to wait for the deploy and the full regeneration of the docs (this could take a while). Thanks!
I am closing here then.
@CoalaJoe Please let us know if the issue persists for you the next days.
Most helpful comment
Definitely solution 2 for me. If people want to translate the documentation text, I think they should be free to do so, we just have to prevent that the code examples are translated.