Reputation: 491
I created 2 resource files, one for English (Resource.en.resx
) and another for Persian (Resource.per.resx
) in App_LocalResources
folder.
I have attached them to my server control (Label1), this way:
<asp:Label ID="Label1" runat="server" Text="Label"
meta:resourceKey="Label1">
</asp:Label>
and Page header like this:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Persian.aspx.cs"
Inherits="Persian" Culture="auto:en-US" UICulture="auto" %>
After browsing in Google chrome I added 2 languages Us English
and Persian
and set Persian to top priority.
But it still displays in English not Persian, why? I am using VS 2013 and .net 4.5.
Upvotes: 0
Views: 422
Reputation: 491
One wild guess: the language code for Persian is fa (Farsi), not per. Try renaming your resx file to Resource.fa.resx
Upvotes: 2