﻿# Localize text from scripts

> [HTML Version](localization-in-scripts.html)

In **.po** files, you can localize text added to the interface in a custom [script](360027203731.md), including in the [Code widget](code_widget.md). To do this, use the [SR object and its T() method](https://tssdk.brix365.com/en/latest/interfaces/_03_globals_.translator.html).

For example, to make a label created in the **Code** widget translatable, specify its text in the method as follows:

````
<% if (true) \{ %>  
<br>  
<%= SR.T('Client list') %>  
<% \} %>

````
The **Client list** string will be added to the localization **.po** files:

- At the level of the component where the **Code** widget is placed.

- At the configuration level.

Add translations of this string to the **.po** files for the locales used so that users see the text in the interface in their profile language. For more information, see [Translate configuration or components](translate-configuration-and-components.md).