-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Support localization resources in a separate assembly #8739
Comments
Hi. It looks like this is a question about how to use ASP.NET Core. While we do our best to look through all the issues filed here, to get a faster response we suggest posting your questions to StackOverflow using the asp.net-core-mvc tag. |
@ryanbrandenburg, can you please answer this question when you get time? Thanks! |
You can use |
@mkArtakMSFT There is a post on this subject at stackoverflow, however there is not a real answer, check the link @ryanbrandenburg , @hishamco I did lots of thing but I couldn't get it work. Is there any real world application that works like this way? I know resources and pages or classes follow namespace convention, but I couldn't understand how using an assemblyInfo solves this. Here what I did;
Do we need any other configuration in And project structure is as follows;
SharedResources are the only working part in project right now btw. I suspect |
Nope, it should be on @fabercs could you please share with us a minimal repo to reproduce your issue? |
Sure, I will investigate on this .. |
I notice there 're many thing missing such as: Suffix views with culture code |
I also realized about Suffix option missing middleware and commited it. I added |
Again |
Ok, I have deleted the solution and added a new one with the |
@ryanbrandenburg how |
@hishamco, as
you always pass the executing assembly to the factory So it crates the |
There's no
Cool, but still I'm not sure why we need to subclass if the localizer aware about |
@hishamco my mistake, I just meant to
|
@fabercs it's unclear to me if you're sorted now. If you're sorted we'll close this out. If your not could you re-state your current problem? |
@ryanbrandenburg indeed I was expecting all will work properly when moving all my working (conventional) localization system from Web project to a separate project, however adding only a |
For your For your DataAnnotations issue, could you file a new issue (now against the aspnet/AspNetCore repo since we're moving everything) so that we can keep its context clean? |
Is this a Bug or Feature request?:
It is a feature, but not sure if it exists or not
Description of the problem:
I am trying to move the localization resources(
MyProject.Web.Resources
) inMyProject.Web
asp.net core mvc project to another separateMyProject.Resources
project. I guess it is only doable for a shared resource, however, by doing this, I still want to make use of theIStringLocalizer
work in my views and controllers. It seems it does not right now.Version of
Microsoft.AspNetCore.Mvc
The text was updated successfully, but these errors were encountered: