# How to fetch plugin configuration based on Shop Language selected?

**URL:** <https://forum.shopware.com/t/how-to-fetch-plugin-configuration-based-on-shop-language-selected/52317>\
**Category:** Programmierung\
**Created:** [12. April 2018 um 07:40 UTC](https://forum.shopware.com/t/how-to-fetch-plugin-configuration-based-on-shop-language-selected/52317 "2018-04-12T07:40:46Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![tashfeen](https://avatars.discourse-cdn.com/v4/letter/t/b782af/32.png) [@tashfeen](https://forum.shopware.com/u/tashfeen)\
**Post date:** [12. April 2018 um 07:40 UTC](https://forum.shopware.com/t/how-to-fetch-plugin-configuration-based-on-shop-language-selected/52317/1 "2018-04-12T07:40:46Z")

</div>

**Description:&nbsp;** I am building a plugin for my shop which has multiple languages. The plugin has a text field. I want to fetch the configuration setting based on the shop language selected. For example for english I need to fetch the text in english and vice versa for German.

**Problem:&nbsp;** The text setting for the main shop (English) gets fetched only. Even when the language selected is German the shop fetches only Englsih text (Main shop text).

**Code:**

My element type is text and scope is **shop**

&nbsp;

&nbsp;

> //Get configuration $config = $controller-\>get(‚shopware.plugin.cached\_config\_reader‘)-\>getByPluginName(‚PluginName‘); //Fetch url from configuration $videoLink = $config[‚videoLink‘]; //Assign to frontend $controller-\>View()-\>assign(‚videoLink‘, $videoLink);

I have looked through documentation but can’t find anything that talks about it. Any help would be appreciated.

---

<div class="post-metadata">

**Author:** ![ahmadsaad](https://avatars.discourse-cdn.com/v4/letter/a/65b543/32.png) [@ahmadsaad](https://forum.shopware.com/u/ahmadsaad)\
**Post date:** [12. April 2018 um 08:03 UTC](https://forum.shopware.com/t/how-to-fetch-plugin-configuration-based-on-shop-language-selected/52317/2 "2018-04-12T08:03:09Z")

</div>

Hallo ,

&nbsp;

```
$config = $controller->get('shopware.plugin.cached_config_reader')->getByPluginName('PluginName', Shopware()->Shop());

```

VG,

Ahmad
