Base solution for your next web application
Open Closed

L("Login") in Views in Areas #700


User avatar
0
hakan created

I have choosed: Multi Page Web Application, Entinty Framework and Include module zero!

I cant L("Login") in Views in Areas to work, it works in the controller!

What do I missing?

I have added in the area views

public abstract class SimpleTaskSystemWebViewPageBase : SimpleTaskSystemWebViewPageBase<dynamic>
{
}

public abstract class SimpleTaskSystemWebViewPageBase<TModel> : AbpWebViewPage<TModel>
{
    protected SimpleTaskSystemWebViewPageBase()
    {
        LocalizationSourceName = "SimpleTaskSystem";
    }
}

3 Answer(s)
  • User Avatar
    0
    hikalkan created
    Support Team

    You should set viewbase in web.config for the area. Example: <a class="postlink" href="https://github.com/aspnetboilerplate/aspnetboilerplate-templates/blob/master/src/AbpCompanyName.AbpProjectName.WebMpa/Views/web.config#L13">https://github.com/aspnetboilerplate/as ... config#L13</a>

  • User Avatar
    0
    sayram created

    i faced similar problem too when i use @L("Login") in my custum views. Outputs was like [Login]. After second compile it worked fine.

    Good to know it about ViewPageBase

  • User Avatar
    0
    hikalkan created
    Support Team

    You must compile your project since localizations are cached and they are embedded resources (so, need an assembly re-build).