04.07.2019 Views

frontend-developer-1

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Implement Internationalization of Frontend Pages<br />

You must then create a new language module within the app/i18n/<br />

SwiftOtter_FR/ (or something similar). This contains the usual module<br />

files (registration.php uses the \Magento\Framework\Component\<br />

ComponentRegistrar::LANGUAGE component type). It also includes a<br />

language.xml file:<br />

<br />

<br />

fr_FR<br />

SwiftOtter<br />

fr_fr<br />

<br />

<br />

You can include multiple nodes in the language.xml file. If Magento<br />

does not find a string in the included language package, it will search through each<br />

(and subsequently those language package’s nodes) until it finds<br />

an applicable translation.<br />

If no translation is found, module or theme’s own translation is used. If none is<br />

found, the original, untranslated text is returned.<br />

Copyright © 2018, SwiftOtter, Inc.<br />

144

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!