Plugin settings per site / locale (Craft 3) This is a followup question to this question which asked about the possibility of per-site plugin config for Craft 3.

I'm a plugin author and have had a feature request for allowing my plugin to have different settings based on the current site. Looking at the above question, it sounds like this used to be possible in Craft 2:

&lt;?php

return [
    'flagName' =&gt; [
        'de' =&gt; 'Bundesflagge',
        'fr' =&gt; 'Tricolore',
    ],
];


This doesn't work in Craft 3, alas (throws an error). I could write something into my plugin's admin area to loop through known sites and output config per-site but this seems like something Craft should be able to do out-of-the-box (especially given the above method used to be valid). Does anyone know if there's a good way to do this in Craft 3?
There is no native support for this, you can follow my approach and create a custom table for it to store the settings for each site

Another way is to return a different array depending on the current site in your config file

if(Craft::$app-&gt;getSites()-&gt;getCurrentSite()-&gt;handle === X){
    return ['flagName' =&gt; 'Tricolore'];
} else {
    return ['flagName' =&gt; 'Bundesflagge'];
}


or

$array = [
    'de' =&gt; [
        'flagName' =&gt; 'Bundesflagge'
    ],
    'fr' =&gt; [
        'flagName' =&gt; 'Tricolore'
    ]
];

return $array[Craft::$app-&gt;getSites()-&gt;getCurrentSite()-&gt;handle];