如何使用AngularJS将国际化添加到选择下拉列表中?
我使用以下代码在下拉列表中填充数据。下拉列表的目的是 要向用户提供内容类型选择,请执行以下操作:如何使用AngularJS将国际化添加到选择下拉列表中?,angularjs,Angularjs,我使用以下代码在下拉列表中填充数据。下拉列表的目的是 要向用户提供内容类型选择,请执行以下操作: <select data-ng-disabled="!selectedSubject" data-ng-model="selectedContentType" data-ng-options="item.id as item.name for item in contentTypes"> <option sty
<select
data-ng-disabled="!selectedSubject"
data-ng-model="selectedContentType"
data-ng-options="item.id as item.name for item in contentTypes">
<option style="display: none" value="">Select Content Type</option>
</select>
我见过国际化的例子,但不确定Angular将走哪条路,以及它们可能会将哪条路融入到以后的版本中
有谁能给我一些提示/提示,告诉我一个好的行动方案,帮助我实现国际化。特别是对于提出的任何解决方案,我如何将其合并到像这样的下拉选择列表中
<select
data-ng-disabled="!selectedSubject"
data-ng-model="selectedContentType"
data-ng-options="item.id as (item.name | myInternationalizationFilter ) for item in contentTypes">
<option style="display: none" value="">( 'selectContentType' | myInternationalizationFilter </option>
</select>
您可以通过为处理国际化而创建的筛选器运行item.name
您可以通过为处理国际化而创建的筛选器运行item.name