How to setup custom site routes created by user in plugin settings In my plugin settings I am allowing the user to specify url formats for each locale along with desired template path, much like sections.  How do I then register those custom url formats as site routes?
You can use the registerSiteRoutes() hook in your plugin's primary class.

Assuming your custom URL formats are stored in an array in a plugin setting called customRoutes (use AttributeType::Mixed for arrays), and that the array consists of key/value paired routes and template paths:

public function registerSiteRoutes()
{
    return $this-&gt;getSettings()['customRoutes'] ?: array();
}


Here's how the customRoutes array should look:

array(
    'some-custom-route' =&gt; '_some-custom-template',
    'another-custom-route' =&gt; '_another-custom-template',
),