API page: https://api.drupal.org/api/drupal/core!modules!system!language.api.php/g...

At the bottom of this page, there is supposed to be a code section giving examples of how to internationalize various types of text.

It is not showing up as code.

The reason is that there is no @endcode at the end of the code section.

So, the task here is to add the @endcode line, right after these lines in language.api.php:

 * // Twig template
 * {% trans with {'context': 'Long month name'} %}
 *  May
 * {% endtrans %}

Reference for @code/@endcode tags:
https://www.drupal.org/node/1354#code

Also note that on another issue we are planning to move this language.api.php file to a different directory. So if the above link to the Internationalization topic doesn't work, it's probably already been moved. In this case, go to the Topics list for Drupal 8 on api.drupal.org and find the Internationalization topic, which will tell you where the file is.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

mark.labrecque’s picture

Assigned: Unassigned » mark.labrecque
mark.labrecque’s picture

I think this is all that was needed, but perhaps other changes are needed? I will stand by for any other changes needed on this.

Thanks!

mark.labrecque’s picture

Status: Active » Needs review
jhodgdon’s picture

Status: Needs review » Fixed

Yes, that's it, thanks! Committed to 8.0.x.

  • jhodgdon committed 5abc88d on 8.0.x
    Issue #2487464 by mark.labrecque: Internationalization topic code...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.