---
sourceDocument: ブラジル ServiceNow AI Platform ユーザーインターフェイス
sourceDocumentLink: https://servicenow-prod.fluidtopics.net/r/ja-JP/platform-user-interface

 Release :

    - brazil

ft:locale :

    - ja-JP

ft:publication_title :

    - ブラジル ServiceNow AI Platform ユーザーインターフェイス

ft:clusterId :

    - platux

bundleId :

    - platux

workflow :

    - Platform


---

# ウィジェットのインターナショナライズ

# ウィジェットのインターナショナライズ {#ariaid-title1}

リリースバージョン: Brazil  
更新日 2026年09月10日  
![](https://www.servicenow.com/docs/portal-asset/ico-clock) 所要時間：2分  
ウィジェットの \[HTML テンプレート\]、\[クライアントスクリプト\]、または \[サーバースクリプト\] フィールドで `${}` 構文または `gs.getMessage()` 構文を使用して、翻訳する文字列にタグを付け、サービスポータルコンテンツをローカライズできるようにします。

`${}` または `gs.getMessage()` は、プラットフォームのメッセージテーブル \[sys_ui_message\] を検索して、翻訳内容を確認します。

HTML テンプレートを使用して、ウィジェット内の文字列を国際化します。HTML テンプレートに次のように入力します。

    <div>
      <p>${This message will be internationalized.}</p>
      <p>However, this will NOT be.</p>
    </div>

テキストを `${message}` として記述することは、システムの他の部分で `${gs.getMessage("message")}` と記述するのと同じですが、より読みやすい短縮形として記述されます。  
注:  
場合によっては、翻訳に引用符または二重引用符が含まれることがあります。クライアントスクリプトで ${} 構文を使用している場合は、JavaScript エラーが発生する可能性があります。翻訳されたメッセージをフェッチする最も安全な方法は、サーバースクリプトで取得することです。次に、クライアント側の Angular バインディングに値を割り当てます。

## クライアントスクリプトの文字列の翻訳

    function() {
      var c =this;
      c.message="${This message will be internationalized}";
    }

HTML テンプレート:

    <div>
      <!-- The output of this text will be internationalized. -->
      <p>{{c.message}}</p>
    </div>

## サーバースクリプトの文字列の翻訳

サーバースクリプトを使用して、サーバーサイドの実行時にスキーマオプションやその他の値を変換します。  
サーバースクリプト

    function() {  
      data.message=gs.getMessage("this message contains 'quotes'");
      //You can also translate schema options using the server script
      //For example, data.message=gs.getMessage(options.title);
    }

HTML テンプレート

    <div>  
      <p>{{c.data.message}}</p>
    </div>


