I'm trying to make a plugin in Craft 3 but want it to be possible to set different settings for each separate site or locale. How would I go about doing this?
1 Answer
Edit
OP updated the question to specify Craft 3, so this is no longer relevant.
You can define a separate value for each locale, as described in the localisation documentation:
<?php
return [
'flagName' => [
'de' => 'Bundesflagge',
'fr' => 'Tricolore',
],
];
-
I can't seem to get this to work, I'm trying to do this in Craft 3 though, are you sure it's the same?– RiasCommented May 8, 2017 at 8:16
-
Ah, I see you updated the question. I'm not sure about Craft 3, but I suspect it's different. Commented May 8, 2017 at 15:52
-
I'm pretty sure that the above only ever applied to the
siteUrl
and wasn't generalized to work for any setting Commented Jul 12, 2018 at 4:45