Answers.Body: <p>Well... the answer was quite simple.</p>
  
  <pre><code>'siteUrl' =&gt; array(
      'en_ca' =&gt; 'http://localhost/mysite',
      'fr_ca' =&gt; 'http://localhost/mysite/fr',
  ),
  </code></pre>
  
  <p>The _ca part was what was missing.  Now my site works amazingly.</p>
  
  <p>Sorry for the run around and I hope this can help someone.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-02-04T16:39:51.473Z
Answers.LastActivityDate: 2016-02-04T16:39:51.473Z
Answers.UserDisplayName: Eric Chantigny
Body: <p>I'm trying to setup a bilingual site and I'm having some issues with setting up the URI.  </p>
  
  <pre><code>'siteUrl' =&gt; array(
      'en' =&gt; 'http://localhost/mysite',
      'fr' =&gt; 'http://localhost/mysite/fr',
  ),
  'environmentVariables' =&gt; array(
      'baseUrl'  =&gt; 'http://localhost/mysite/',
  )
  </code></pre>
  
  <p>In my single settings:
  URI for french: {baseUrl}fr/nouvelles
  URI for english: {baseUrl}news</p>
  
  <p>Not sure how to set this up to have it setup the way I want it.  Removing the baseURL part just doesn't print the mysite subfolder.</p>
  
  <p>Thanks!</p>
  
  <p>EDIT:  Here's the real problematic after investigation.</p>
  
  <p>The URI should not include anything more than the name so:
  In my single settings:
  URI for french: nouvelles (<a href="http://localhost/mysite/fr/nouvelles" rel="nofollow">http://localhost/mysite/fr/nouvelles</a>)
  URI for english: news (<a href="http://localhost/mysite/news" rel="nofollow">http://localhost/mysite/news</a>)</p>
  
  <p>Now, those 2 pages work like expected.</p>
  
  <p>But, if I assign those pages to a Entries field, to create my menu, when I pull the url, it never inclues the /fr portion.  Even the default template doesn't render the correct link, dropping the /fr part in the url too:</p>
  
  <pre><code>{% for entry in craft.entries.section('news').limit(5).find() %}
      &lt;li&gt;&lt;a href="{{ entry.url }}"&gt;{{ entry.title }}&lt;/a&gt;&lt;/li&gt;
  {% endfor %}
  </code></pre>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-02-04T15:51:44.413Z
Comments.Text: Have you added the physical subfolder (with index.php in it etc.) to your wwwroot for the secondary language? You do not need {baseUrl} in your Section slug settings.
Comments.UserDisplayName: naboovalley
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-02-04T16:16:00.623Z
Comments.Text: Yes! I should specify that everything works like it should when I visit the pages.  But, not when I try to access the page's url, or the other locale page's url.
  http://localhost/cartovista/ is in english 
  http://localhost/cartovista/fr is in french
  
  I think I'm getting things confused in the URI part.  I don't think it requires the fr part.  I will dig a bit more but if someone understands my issue and has already setup a bilingual site, with language switch, I would appreciate some pointers.
Comments.UserDisplayName: Eric Chantigny
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-02-04T16:28:27.493Z
Comments.Text: Ok, I have now pinpointed my issue to url in the twig template.  Anytime a page url is called, the fr portion is never included, which renders the link useless.
  
  link.page[0].url
  link page, being a Entries field type.
Comments.UserDisplayName: Eric Chantigny
Tags: <localization><url><settings>
Title: Bilingual site page URL issues
ThreadText: # Bilingual site page URL issues
  
  (Asked by: username_0 on 2016-02-04)
  
  I'm trying to setup a bilingual site and I'm having some issues with setting up the URI.
  
  ```
  'siteUrl' => array(
      'en' => 'http://localhost/mysite',
      'fr' => 'http://localhost/mysite/fr',
  ),
  'environmentVariables' => array(
      'baseUrl'  => 'http://localhost/mysite/',
  )
  
  ```
  
  In my single settings:
  URI for french: {baseUrl}fr/nouvelles
  URI for english: {baseUrl}news
  
  Not sure how to set this up to have it setup the way I want it. Removing the baseURL part just doesn't print the mysite subfolder.
  
  Thanks!
  
  EDIT: Here's the real problematic after investigation.
  
  The URI should not include anything more than the name so:
  In my single settings:
  URI for french: nouvelles (<http://localhost/mysite/fr/nouvelles>)
  URI for english: news (<http://localhost/mysite/news>)
  
  Now, those 2 pages work like expected.
  
  But, if I assign those pages to a Entries field, to create my menu, when I pull the url, it never inclues the /fr portion. Even the default template doesn't render the correct link, dropping the /fr part in the url too:
  
  ```
  {% for entry in craft.entries.section('news').limit(5).find() %}
      <li><a href="{{ entry.url }}">{{ entry.title }}</a></li>
  {% endfor %}
  
  ```
  
  **Tags:** localization, url, settings
  
  > **Comments:**
  > **username_1**: Have you added the physical subfolder (with index.php in it etc.) to your wwwroot for the secondary language? You do not need {baseUrl} in your Section slug settings.  
  > **username_0**: Yes! I should specify that everything works like it should when I visit the pages.  But, not when I try to access the page's url, or the other locale page's url. http://localhost/cartovista/ is in english  http://localhost/cartovista/fr is in french  I think I'm getting things confused in the URI part.  I don't think it requires the fr part.  I will dig a bit more but if someone understands my issue and has already setup a bilingual site, with language switch, I would appreciate some pointers.  
  > **username_0**: Ok, I have now pinpointed my issue to url in the twig template.  Anytime a page url is called, the fr portion is never included, which renders the link useless.  link.page[0].url link page, being a Entries field type.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2016-02-04. Score: 3 | Accepted answer
  
  Well... the answer was quite simple.
  
  ```
  'siteUrl' => array(
      'en_ca' => 'http://localhost/mysite',
      'fr_ca' => 'http://localhost/mysite/fr',
  ),
  
  ```
  
  The \_ca part was what was missing. Now my site works amazingly.
  
  Sorry for the run around and I hope this can help someone.
  
  
  ---
  
  