Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1017145
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T10:39:33+00:00 2026-05-16T10:39:33+00:00

I want to localize / globalize the fields on my Login page. I am

  • 0

I want to localize / globalize the fields on my Login page. I am using ASP.NET MVC 3 Preview 1 with the razor view engine.

Some background

First of all, i’ve set my routing and added a localization attribute handler so that I can write http://mysite.com/{lang}/{controller}/{action}/{id}. Now this works all good. In my Viewsfolder I’ve added a Home folder with a corresponding App_LocalResources so far so good. I can even add language files for different languages such as Index.resx and Index.sv.resx`.

The problem

Having a file called Account.resx in the root’s App_GlobalResources I of course imagine I should be able to access that from my pages. In my AccountModel.cs ( which came with the installation / template project ) I have added the following to the LogOnModel

public class LogOnModel
{
    [Required]
    [Display(Name = "UserName", ResourceType = typeof(Account))]
    public string UserName { get; set; }

    [Required]
    [DataType(DataType.Password)]
    [Display(Name = "Password", ResourceType = typeof(Account))]
    public string Password { get; set; }

    [Display(Name = "RememberMe", ResourceType = typeof(Account))]
    public bool RememberMe { get; set; }
}

I have two files in my App_GlobalResource

  • Account.resx
  • Account.sv.resx

And it does in fact take the text from the english / default file. But when I append /sv/ to my URL or even ensure that the culture is swedish, it doesn’t change the language to what is in my “Account.sv.resx`.

An example of what could be in the LogOn.cshtml

<div class="editor-label">
    @Html.LabelFor(m => m.UserName)
</div>

Any ideas?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T10:39:34+00:00Added an answer on May 16, 2026 at 10:39 am

    Not MVC 3 specific, however this may help

    http://geekswithblogs.net/shaunxu/archive/2010/05/06/localization-in-asp.net-mvc-ndash-3-days-investigation-1-day.aspx

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using the Spark view engine, and want to localize the website. The methods
I am trying to localize standart ASP.NET login control. When I change page culture
My ASP.NET page has some html: Default.aspx : <h2><asp:Localize meta:resourcekey=lblTitle Text=Welcome to so runat=server></h2>
Trying to localize text in ASP.NET labels... want to add a ':' after the
I'm trying to localize client side Javascript in a ASP .NET MVC application. The
I want to localize Web Service in ASP.NET application. I can write the following
I'd like to fully localize my ASP.NET MVC application, and while there are many
I've got some form for user registration and want to localize it via locales
We are using ASP.Net Membership provider for user management module in our WPF based
Does anyone know how to localize date ranges using C#? In particular, I want

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.