I follow this tutorial, which was given as an answer to this question, however I am stuck when displaying a resource.
As in the tutorial, I created two files
App_GlobalResources /Global.en.resx /Global.ru.resx
I made a data annotation class that works and adds a cookie without errors, which means that it correctly injects local data into the current stream. When I try to infer a resource, it cannot find it.
I tried to output it like this, and none of these works:
@Global.HomeHello @Global.en.HomeHello @Resources.Global.Homhello // The name 'Resources/Global/etc...' does not exist in the current context
In addition, on this training site I do not see any logic that would enter the correct resource file, how it can do something like (in the tutorial) @Global.HomeHello , and he will know that if url /en/ he needs use Global.en.resx
Please help, using resources for the first time and introducing several languages, it feels 100 times more complicated and confusing than using *.yml files in other frameworks / languages ...
source share