全球化本地化ASP网络MVC [英] Globalization localization ASP net MVC

查看:91
本文介绍了全球化本地化ASP网络MVC的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好。

我在我的Asp Net Mvc项目中使用全球化和本地化..我正面临一个问题。

我的标签视图。当这些通过剃须刀标记时如



@ Html.LabelFor(m => m.Name)



然后在改为阿拉伯语后,将名称改为阿拉伯语。但如果我使用传统的HTML标签,比如



名称*



然后选择阿拉伯语之后的值这个标签是不是改为阿拉伯语?

不简单的html标记支持mvc中的全球化/本地化?



请告诉我该如何解决这个问题?



我的尝试:



i搜索谷歌,但无法找到任何解决方案。文章中的任何地方都只通过剃刀语法

hello guys.
i'm using Globalization and Localization in my Asp Net Mvc project.. i'm facing an issue in it.
the lables in my view. when these are marked through razor like

@Html.LabelFor(m=>m.Name)

then after change to arabic it's change the name to arabic. but if i use traditional labels of HTML like

Name*

then after selecting arabic the values of this lable is not changed to arabic ?
does not simple html markup supports globalization/localization in mvc ?

kindly tell me how can i fix this ?

What I have tried:

i searched google for it but could not find any solution for it. everywhere in articles it's done only through razor syntax

推荐答案

不,直接的HTML不会更新。 HtmlLabelFor通过本地化感知过程,可以根据所选的区域设置更新字符串,但硬编码的HTML字符串不会。
No, straight HTML will not update. HtmlLabelFor passes through a localization aware process and can update the strings based on the selected locale, but a hardcoded HTML string does not.


这篇关于全球化本地化ASP网络MVC的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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