2017-08-09 3 views
0

私は翻訳済みのJSONファイルを持っています。私は具体的にはSelect_Time_Formatという属性を持っています。私はHTML/JSON:ロケールに応じてプレースホルダを変換します。

 <label for="time-format" i18ng="'Time_Format'"></label> 
     <div class="select2-container select x100" id="s2id4"> 
     <select ngyn-select2 
       ng-model="$ctrl.tournament.time_format" 
       ng-options="key as label for (key, label) in $ctrl.timeFormats" 
       id="time-format" 
       name="time_format" 
       class="select x100" 
       placeholder="Select Time Format"> 
     </select> 

i18ng="'Select_Time_Format'"ようなものでplaceholder="Select Time Formatを交換するいくつかの方法があります(下記見て)HTMLフィールドのプレースホルダー属性では、この変換を使用したいですか?

答えて

0

正しい構文は次のとおりです。

placeholder="{{ 'Whatever_Your_Translation_Name_Is' | t }}"

関連する問題