AngularJS でangular-translationおよびangular-foundationモジュールを使用しており、Foundation トップバーを次のように定義しています。
<top-bar custom-back-text="true" back-text="My back text">
[...]
</top-bar>
に翻訳フィルタを適用する必要がありますMy back text
。すでにこれら2つのソリューションを試しましたが、成功しませんでした:
例 1 - コード
<top-bar custom-back-text="true" back-text="'BACK.KEY' | translate">
例 1 - メニュー内のテキスト
BACK.KEY
例 2 - コード
<top-bar custom-back-text="true" back-text="{{ 'BACK.KEY' | translate }}">
例 2 - メニュー内のテキスト
'BACK.KEY' | translate
これらの 2 つのモジュールでこれを達成する可能性はありませんか?
使用バージョン
angular-translate: 2.4.2
angular-foundation: 0.5.1