Skip to content
This repository was archived by the owner on Nov 29, 2018. It is now read-only.
This repository was archived by the owner on Nov 29, 2018. It is now read-only.

Shared Resource does NOT work when set ResourcePath property of LocalizationOptions: #268

@kennywangjin

Description

@kennywangjin

Currently, I am using one shared resource file RESX to centrally implement localization.
For cshtml views, I am using IStringLocalizer for localization. And I have one folder "Resources" in the project root with one empty "SharedResource.cs" file and one "SharedResource.zh.resx" file in it.
Problem is: When I configure "StartUp.cs"'s "ConfigureService" with code services.AddLocalization(options => options.ResourcesPath = "Resources");, localization does NOT work! But when I removed the options options => options.ResourcesPath = "Resources", it WORKS!
I am doing everything following aspnet core online docs.
Shouldn't I set the resource path when using shared resource?
How could I mix share resource and view-local resource together in one project?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions