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?



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:


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?
    – Rias
    May 8 '17 at 8:16
  • Ah, I see you updated the question. I'm not sure about Craft 3, but I suspect it's different. May 8 '17 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 Jul 12 '18 at 4:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.