Body: <p>I'm working on the language switcher and have it working. The only thing is I want it to pull from <code>group</code> <code>data-id=1</code> It's pulling from all sites because of the <code>i18n</code> to change the language name to it's native name.</p>
  
  <p>I made a "disabled" group in Craft CMS 3 and put Russian in it and it shows up with <code>i18n</code>.  I had it working before by only the 2 letter abbreviation showed such as "de" instead of Deutsch and Russian didn't show.</p>
  
  <pre><code>&lt;div class="language-menu" aria-labelledby="navbarDropdownMenuLink" id="language-menu"&gt;
  {% set currentSite = craft.app.sites.currentSite %}
  {% for siteInGroup in currentSite.getGroup.getSites() %}
     {% if siteInGroup.id == entry.siteId %}
        {% for locale in craft.i18n.getSiteLocales() %}
          &lt;a href="{{ entryForOtherSite.getUrl() }}"&gt;{{ locale.getDisplayName() }}&lt;/a&gt;
     {% else %}
        {% set entryForOtherSite = craft.entries.id(entry.id).site(siteInGroup).one() %}
          &lt;a href="{{ entryForOtherSite.getUrl() }}"&gt;{{ locale.getDisplayName(siteInGroup.language) }}&lt;/a&gt;
        {% endfor %}
     {% endif %}
  {% endfor %}
  &lt;/div&gt;
  </code></pre>
  
  <p>I figured it out:</p>
  
  <pre><code>    {% set currentSite = craft.app.sites.currentSite %}
  {% for siteInGroup in currentSite.getGroup.getSites() %}
     {% if siteInGroup.id == entry.siteId %}
          &lt;a href="{{ entryForOtherSite.getUrl() }}"&gt;{{ locale.getDisplayName() }}&lt;/a&gt;
     {% else %}
        {% set entryForOtherSite = craft.entries.id(entry.id).site(siteInGroup).one() %}
        {% set locale = craft.i18n.getLocaleById(siteInGroup.language) %}
          &lt;a href="{{ entryForOtherSite.getUrl() }}"&gt;{{ locale.getDisplayName(siteInGroup.language) }}&lt;/a&gt;
     {% endif %}
  {% endfor %}
  </code></pre>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-11-08T20:17:55.473Z
Comments.Text: Sorry, but I'm not following... what's the issue you're having and what's the behavior you're looking for?  What is `group` and `data-id=1`?
Comments.UserDisplayName: Brad Bell
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-11-08T20:37:23.077Z
Comments.Text: I have two site groups (disabled and live) and just want to show the live group on the language menu.
Comments.UserDisplayName: Nick
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-11-08T21:33:13.497Z
Comments.Text: I figured it out
Comments.UserDisplayName: Nick
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-11-08T21:42:35.573Z
Comments.Text: Awesome! Would you mind adding your solution as an official answer?
Comments.UserDisplayName: Brad Bell
Tags: <craft3><language>
Title: Craft 3 Launguage Switcher by certain group
ThreadText: # Craft 3 Launguage Switcher by certain group
  
  (Asked by: username_0 on 2018-11-08)
  
  I'm working on the language switcher and have it working. The only thing is I want it to pull from `group` `data-id=1` It's pulling from all sites because of the `i18n` to change the language name to it's native name.
  
  I made a "disabled" group in Craft CMS 3 and put Russian in it and it shows up with `i18n`. I had it working before by only the 2 letter abbreviation showed such as "de" instead of Deutsch and Russian didn't show.
  
  ```
  <div class="language-menu" aria-labelledby="navbarDropdownMenuLink" id="language-menu">
  {% set currentSite = craft.app.sites.currentSite %}
  {% for siteInGroup in currentSite.getGroup.getSites() %}
     {% if siteInGroup.id == entry.siteId %}
        {% for locale in craft.i18n.getSiteLocales() %}
          <a href="{{ entryForOtherSite.getUrl() }}">{{ locale.getDisplayName() }}</a>
     {% else %}
        {% set entryForOtherSite = craft.entries.id(entry.id).site(siteInGroup).one() %}
          <a href="{{ entryForOtherSite.getUrl() }}">{{ locale.getDisplayName(siteInGroup.language) }}</a>
        {% endfor %}
     {% endif %}
  {% endfor %}
  </div>
  
  ```
  
  I figured it out:
  
  ```
      {% set currentSite = craft.app.sites.currentSite %}
  {% for siteInGroup in currentSite.getGroup.getSites() %}
     {% if siteInGroup.id == entry.siteId %}
          <a href="{{ entryForOtherSite.getUrl() }}">{{ locale.getDisplayName() }}</a>
     {% else %}
        {% set entryForOtherSite = craft.entries.id(entry.id).site(siteInGroup).one() %}
        {% set locale = craft.i18n.getLocaleById(siteInGroup.language) %}
          <a href="{{ entryForOtherSite.getUrl() }}">{{ locale.getDisplayName(siteInGroup.language) }}</a>
     {% endif %}
  {% endfor %}
  
  ```
  
  **Tags:** craft3, language
  
  > **Comments:**
  > **username_1**: Sorry, but I'm not following... what's the issue you're having and what's the behavior you're looking for?  What is `group` and `data-id=1`?  
  > **username_0**: I have two site groups (disabled and live) and just want to show the live group on the language menu.  
  > **username_0**: I figured it out  
  > **username_1**: Awesome! Would you mind adding your solution as an official answer?  
  
  ---
  
  ## 0 answers
  
  