Skip to content

LocalizationClientsideProvider with Optimizely CMS Multisite #353

@nhnomd

Description

@nhnomd

Hi,

We are currently trying to add LocalizationClientsideProvider to our Optimizely CMS Multisite so that we don't need to retrieve all resources backend to use them Frontend. If we add it like in the setup guide here https://github.com/valdisiljuconoks/LocalizationProvider/blob/master/aspnetcore/docs/client-side-provider-netcore.md it doesnt retrieve fallback language.

services
            .AddDbLocalizationProvider(ctx =>
            {
                ctx.UseSqlServer(configuration["ConnectionStrings:EPiServerDB"]);
                ctx.DefaultResourceCulture = new CultureInfo("no");

                ctx.FallbackLanguages.Try(new CultureInfo("nb"))
                    .Then(new CultureInfo("nn"))
                    .Then(new CultureInfo("en"));
            })

If i do this, fallback languages works, but problem with multisite is that there is a different fallback-setup on each site, so i cannot set it like this. It needs to be dynamic and different for each site. So how can i get fallback languages to work with LocalizationClientsideProvider in Optimizely CMS Multisite?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions