I have 3 languages in my site English, Danish and Swedish.I have created i18n folder in Magento_root/app
path and I have language.xml
, composer.json
, da_DK.csv
and registration.php
files inside da_DK folder inside Locale folder which is in i18n folder Magento_root/app/i18n/Locale/da_DK/
.
Translation is working perfectly for Danish. Likewise I have created the same structure for Swedish, but unfortunately, it did not work for Swedish. Path for Swedish Magento_root/app/i18n/Locale/sv_SE/
Magento_root/app/i18n/Locale/sv_SE/composer.json
{
"name": "Locale/language-sv_se",
"description": "Swedish Language",
"version": "100.0.2",
"license": [
"OSL-3.0",
"AFL-3.0"
],
"require": {
"magento/framework": "100.0.*"
},
"type": "magento2-language",
"autoload": {
"files": [
"registration.php"
]
}
}
Magento_root/app/i18n/Locale/sv_SE/language.xml
<?xml version="1.0"?>
<!-- /** * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt
for license details. */ -->
<language xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:App/Language/package.xsd">
<code>sv_SE</code>
<vendor>locale</vendor>
<package>sv_se</package>
</language>
Magento_root/app/i18n/Locale/sv_SE/registration.php
<?php
/**
* Copyright © 2015 Magento. All rights reserved.
* See COPYING.txt for license details.
*/
\Magento\Framework\Component\ComponentRegistrar::register(
\Magento\Framework\Component\ComponentRegistrar::LANGUAGE,
'locale_sv_SE',
__DIR__
);
Magento_root/app/i18n/Locale/sv_SE/sv_SE.csv
"SIGN UP","BLI MEDLEM"
"LOG IN","logga in"
"LOG OUT","LOGGA UT"
I don't know really why the same way is working for Danish and not for Swedish. Can anyone please help me out here?
My folder structure is in the above screenshot, I don't know what I did wrong, Can anyone please help me out here?