Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show LanguageSwitcher if more than one culture #1025

Merged
merged 2 commits into from
Jan 2, 2021

Conversation

hishamco
Copy link
Contributor

Fixes #1024

@PavelVsl
Copy link
Contributor

Sorry, but why in ControlPanel? Change it in LanguageSwitcher.razor

@if (_supportedCultures?.Count() > 1)  // HERE
{
    <div class="btn-group" role="group">
        <button id="btnCultures" type="button" class="btn btn-outline-secondary dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
            <span class="oi oi-globe"></span>
        </button>
        <div class="dropdown-menu" aria-labelledby="btnCultures">
            @foreach (var culture in _supportedCultures)
            {
                <a class="dropdown-item @(CultureInfo.CurrentUICulture.Name == culture.Name ? "active" : String.Empty)" href="#" @onclick="@(async e => await SetCultureAsync(culture.Name))">@culture.DisplayName</a>
            }
        </div>
    </div>
}

@hishamco
Copy link
Contributor Author

Oops I thought that switcher button in the ControlPanel, it's my bad ;)

@hishamco
Copy link
Contributor Author

@sbwalker could we merge this

@sbwalker
Copy link
Member

I took a few days vacation with my family to end 2020 and I did not bring my laptop... I will return home tomorrow and will be able to catch up on all PR reviews, issues, etc...

@hishamco
Copy link
Contributor Author

hishamco commented Jan 1, 2021

Take your time and enjoy with your vacation

@sbwalker sbwalker merged commit 7d84f15 into oqtane:dev Jan 2, 2021
@hishamco hishamco deleted the language-switcher branch January 2, 2021 19:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Do not show LangSwitcher when only one language is defined
3 participants