Output different menus based on site section (URL) I'm working on a Drupal 8 site that's divided up into sections that correspond to projects. So URL aliases will be /project-a/some-content, /project-b/some-content, etc.

I'd like to support creating menus—for each section—in the admin, and to render those in the primary navigation region based on which section you're in.

My assumption is that somewhere I need a switch statement that uses URL segment 1 for case and specifies a configured menu to load for each case, or a default.

Is this the best approach? Where would I do that, if so?
You should be able to use standard path based visibility conditions.

Just put both menu blocks into the same region, and configure each to only be shown on paths like /project-a/* and the other on /project-b/* and so on.