[ci skip] Add missing setting locale code snippet.

This is for 3 Internationalizing your Application of i18n.md.

Missing the code as mentioned in 2.3, setting locale.

Without this, the example to add config/locales/pirate.yml will not work.
[ci skip] Fix links in section 5.3 of i18n.md

Now all links point to the correct line number.
Merge pull request #12175 from JuanitoFatas/doc-patch

[ci skip] Add missing setting locale code snippet.