Body: <p>I just finished the structure of a new site, now I am faced with the problem: "regions". I thought I can use categories for routing.</p>
  
  <p>Because I need:</p>
  
  <blockquote>
    <p>example.com/REGION/LANGUAGE/about-us
    <br>or<br>
    example.com/fr/en/about-us in reality -> frensh region, english language</p>
  </blockquote>
  
  <ul>
  <li>First problem: Localize all content and get the language parameter in the URL - CHECK, this is done (i got <code>example.com/en/about-us</code> - quite easy)</li>
  <li>Second problem is, how to get the category (top level) into the routing (not done, I am struggling with this)</li>
  <li>Third problem - and maybe biggest problem - how could I switch the both parameters, because any URL-part is placed AFTER the language parameter. So I would get <br/>
  <code>example.com/LANGUAGE/REGION/about-us</code><br/>
  if I complete the second problem and not <br/>
  <code>example.com/REGION/LANGUAGE/about-us</code><br/><br/>
  This has to be possible with craft or a workaround, but I do not get it. Maybe someone has a solution or a hint for this in other CMS I solved this structure, but in Craft....well....not yet</li>
  </ul>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-06-27T13:40:09.103Z
Comments.Text: I would suggest you not to use a category for the routing because it will most likely break and you'll be unable to change the content depending on a category.. Why don't you use different site groups and different sites for this task, so every region is an individual site group and all sites within a group have a different language
Comments.UserDisplayName: Robin Schambach
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-06-20T08:36:14.217Z
Comments.Text: i never came back here, because we canceled the needs for this, after i tested the site-group-solution, but now it is back.
  
  If i set up multiple groups and sites/languages in this groups, we get stuck with content, because we would have so much duplicate content.
  
  The content in the regions is almost identical, it just change with the language. And some Entries/elements are not available in some regions. Most of the content would be the same in the same language. 
  So we need to copy all french content so all groups of regions which has french language. 
  So we need another solution :(
Comments.UserDisplayName: Thomas
Tags: <plugin-development><craft3><routing><multi-site>
Title: Route manipulating - set regioncode before language-code
ThreadText: # Route manipulating - set regioncode before language-code
  
  (Asked by: username_0 on 2018-06-27)
  
  I just finished the structure of a new site, now I am faced with the problem: "regions". I thought I can use categories for routing.
  
  Because I need:
  
  > example.com/REGION/LANGUAGE/about-us
  >   
  > or  
  > example.com/fr/en/about-us in reality -> frensh region, english language
  
  * First problem: Localize all content and get the language parameter in the URL - CHECK, this is done (i got `example.com/en/about-us` - quite easy)
  * Second problem is, how to get the category (top level) into the routing (not done, I am struggling with this)
  * Third problem - and maybe biggest problem - how could I switch the both parameters, because any URL-part is placed AFTER the language parameter. So I would get   
    `example.com/LANGUAGE/REGION/about-us`  
    if I complete the second problem and not   
    `example.com/REGION/LANGUAGE/about-us`  
      
    This has to be possible with craft or a workaround, but I do not get it. Maybe someone has a solution or a hint for this in other CMS I solved this structure, but in Craft....well....not yet
  
  **Tags:** plugin-development, craft3, routing, multi-site
  
  > **Comments:**
  > **username_1**: I would suggest you not to use a category for the routing because it will most likely break and you'll be unable to change the content depending on a category.. Why don't you use different site groups and different sites for this task, so every region is an individual site group and all sites within a group have a different language  
  > **username_0**: i never came back here, because we canceled the needs for this, after i tested the site-group-solution, but now it is back.  If i set up multiple groups and sites/languages in this groups, we get stuck with content, because we would have so much duplicate content.  The content in the regions is almost identical, it just change with the language. And some Entries/elements are not available in some regions. Most of the content would be the same in the same language.  So we need to copy all french content so all groups of regions which has french language.  So we need another solution :(  
  
  ---
  
  ## 0 answers
  
  