EaDesgin / magento2-romanian-language-pack

The Romanian language pack.
https://www.eadesign.ro
Apache License 2.0
8 stars 25 forks source link

Language pack inheritance order #4

Closed koenner01 closed 7 years ago

koenner01 commented 7 years ago

Is there a reason why there is no Magento vendor inheritance defined in the language.xml ? Because currently if we are adding the eadesigndev/ro_ro pack as a parent to our projects pack, the order in packs is:

eadesigndev |ro_RO Magento|ro_RO Project|ro_RO

Aren't the translations in this pack supposed to replace the Magento ones ? (because now Magento will replace your packs translations)

eadesignro commented 7 years ago

Can you give us example for the inheritance?

koenner01 commented 7 years ago

@eadesignro If you add a language pack to your project with inheritance to this pack like

<?xml version="1.0"?>
<language xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:App/Language/package.xsd">
    <code>ro_RO</code>
    <vendor>projectname</vendor>
    <package>ro_ro</package>
    <use vendor="eadesigndev" package="ro_ro"/>
</language>

The order in which the translations on the frontend will be done will be

eadesigndev |ro_RO Magento|ro_RO Project|ro_RO

So if Magento has a translation for the same line as this pack, the Magento translation will be used! I assume this pack is supposed to be an improvement to the Magento translations ?