Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. MultiLanguage web site

MultiLanguage web site

Scheduled Pinned Locked Moved ASP.NET
phpasp-netcomhardwarehelp
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    cocoonwls
    wrote on last edited by
    #1

    Hi all, I have view of some example (globalization) to develop a multilingua web site. But still cant success on it.i have create a .resx file call rsc.zh-CHS.resx in floder App_GlobalResources. Then using the the code following to display selected language. And also use a dropdownlist to select a preferral language

    private ResourceManager rm;
    protected void Page_Load(object sender, EventArgs e)
    {
    CultureInfo ci;
    if (!IsPostBack)
    {
    Thread.CurrentThread.CurrentCulture = new CultureInfo("en-US");
    rm = new ResourceManager("rsc", Assembly.Load("App_GlobalResources"));
    ci = Thread.CurrentThread.CurrentCulture;
    LoadData(ci);
    }
    else
    {
    rm = new ResourceManager("rsc",Assembly.Load("App_GlobalResources"));
    ci = Thread.CurrentThread.CurrentCulture;
    LoadData(ci);
    }
    }

    public void LoadData(CultureInfo ci)
    {
    lblCNName.Text = rm.GetString("lblCNName", ci);
    lblENName.Text = rm.GetString("lblENName", ci);
    }

    I get a error in **LoadData()** and said that:

    Could not find any resources appropriate for the specified culture or the neutral culture. Make sure "rsc.resources" was correctly embedded or linked into assembly "App_GlobalResources.qb8c2ydr" at compile time, or that all the satellite assemblies required are loadable and fully signed.

    Note: my example come from http://ashrafur.wordpress.com/2008/01/17/multi-language-supported-web-site-in-aspnet/[^] any tips are welcome. regards cocoonwls

    P 1 Reply Last reply
    0
    • C cocoonwls

      Hi all, I have view of some example (globalization) to develop a multilingua web site. But still cant success on it.i have create a .resx file call rsc.zh-CHS.resx in floder App_GlobalResources. Then using the the code following to display selected language. And also use a dropdownlist to select a preferral language

      private ResourceManager rm;
      protected void Page_Load(object sender, EventArgs e)
      {
      CultureInfo ci;
      if (!IsPostBack)
      {
      Thread.CurrentThread.CurrentCulture = new CultureInfo("en-US");
      rm = new ResourceManager("rsc", Assembly.Load("App_GlobalResources"));
      ci = Thread.CurrentThread.CurrentCulture;
      LoadData(ci);
      }
      else
      {
      rm = new ResourceManager("rsc",Assembly.Load("App_GlobalResources"));
      ci = Thread.CurrentThread.CurrentCulture;
      LoadData(ci);
      }
      }

      public void LoadData(CultureInfo ci)
      {
      lblCNName.Text = rm.GetString("lblCNName", ci);
      lblENName.Text = rm.GetString("lblENName", ci);
      }

      I get a error in **LoadData()** and said that:

      Could not find any resources appropriate for the specified culture or the neutral culture. Make sure "rsc.resources" was correctly embedded or linked into assembly "App_GlobalResources.qb8c2ydr" at compile time, or that all the satellite assemblies required are loadable and fully signed.

      Note: my example come from http://ashrafur.wordpress.com/2008/01/17/multi-language-supported-web-site-in-aspnet/[^] any tips are welcome. regards cocoonwls

      P Offline
      P Offline
      Parwej Ahamad
      wrote on last edited by
      #2

      Did you added there a default resource file ?

      Parwej Ahamad

      C 1 Reply Last reply
      0
      • P Parwej Ahamad

        Did you added there a default resource file ?

        Parwej Ahamad

        C Offline
        C Offline
        cocoonwls
        wrote on last edited by
        #3

        Hi there, Sorry for late reply.Thanks for your information.I have solve my problem~ regards cocoonwls

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups