Symfony-docs: Disable faulty translation in documentation

Created on 17 Jun 2016  路  6Comments  路  Source: symfony/symfony-docs

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

2016-06-16 11_36_49-wie https erzwingen oder http fur verschiedene urls symfony cookbook

Website

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.

All 6 comments

馃憤 I'm going to fix this. Thanks for reporting it.

I've checked this issue a bit and we have two possible solutions:

  • Add the <meta name="google" content="notranslate" /> tag to prevent translating the entire page (reference)
  • Allow to translate the pages, but prevent translating <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.

Was this page helpful?
0 / 5 - 0 ratings