ASP.net应用程序隐蔽到多语言 [英] ASP.net application covert to multi lanuage

查看:83
本文介绍了ASP.net应用程序隐蔽到多语言的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是奈都.

我正在开发一个asp.net项目,如果用户选择telugu超级链接,则整个网页都应转换为telugu.如果用户选择印地文,则应将其更改为印地文.

Hi, this is Naidu.

I am developing a asp.net project in which if the user selects telugu hyperlink, entire webpage should be converted to telugu. If user selects hindi, it should be changed to hindi.

推荐答案

链接对帮助您入门的夫妇-
http://msdn.microsoft.com/en-us/library/c6zyy3s9.aspx [ ^ ]
ASP.NET 2.0中的本地化简单介绍 [
Couple of links to help you get started -
http://msdn.microsoft.com/en-us/library/c6zyy3s9.aspx[^]
An Easy Introduction to Localization in ASP.NET 2.0[^]


Google [ http://indiandotnet .wordpress.com/2009/04/24/multi-language-web-site-in-5-easy-steps-in-5-minutes/ [ http://www.c-sharpcorner.com/UploadFile/mosessaur/aspnetlocalization02042006165851PM/aspnetlocalization.aspx [ ^ ]
创建多语言网站-第1部分 [
Google[^] has many links
http://indiandotnet.wordpress.com/2009/04/24/multi-language-web-site-in-5-easy-steps-in-5-minutes/[^]
http://www.c-sharpcorner.com/UploadFile/mosessaur/aspnetlocalization02042006165851PM/aspnetlocalization.aspx[^]
Creating multilingual websites - Part 1[^]


您必须创建附属程序集,添加多个资源字符串文件并在这些文件中保留不同的语言文本..

在运行时,您可以将默认语言更改为自定义..

或者您可以有一个自定义类来获取资源字符串

公共场所资源
{
公共静态GetString(字符串ResourceId,字符串语言)
{
//从特定资源中读取并返回
}
}

您可以从aspx页面调用此类以绑定特定于语言的内容.

最主要的是,您不应该在ASPX页面或代码中直接放置任何文字文本,通过一个资源ID进行操作,并在运行时进行绑定.
You have to create the satellite assembly, add multiple resource string files and keep in the different language texts in those files..

at runtime you can change the default language to your custom..

or you can have a custom class to get the resource string

public calss Resource
{
public static GetString(string ResourceId,string language)
{
//read from specific resource and return it
}
}

you can call this class from the aspx page to bind the language specific content.

the main thing is you should not put any literal text directly in aspx page or code behind, do it through one resource id and bind it at runtime.


这篇关于ASP.net应用程序隐蔽到多语言的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆