Skip to main content
14-Alexandrite
Jan 16, 2024 9:04 AM UTC
Solved

Set localization table programatically.

Hi,

 

1) Is there any way we can create a service to upload tokens to a localization table?

2) Is there a way to manage localization table in a better way instead of adding each token manually?

3) Also how do we use locations inside the service?

14-Alexandrite
Jan 16, 2024 12:48 PM UTC

1. you can use LocalizationTables[<table_name>].AddToken({name: '', value: ''});

2. You can create a UI to manage your tokens.

3. Are you saying how to get a token value in service? You can use one of following services, based on your need,

 

BP_9210462_0-1705409329176.png

 

3 replies

14-Alexandrite
Jan 16, 2024 12:48 PM UTC

1. you can use LocalizationTables[<table_name>].AddToken({name: '', value: ''});

2. You can create a UI to manage your tokens.

3. Are you saying how to get a token value in service? You can use one of following services, based on your need,

 

BP_9210462_0-1705409329176.png

 

Translate
14-Alexandrite
Jan 16, 2024 1:18 PM UTC

Thanks for the response.

All the responses are helpful.

 

Is there any documentation where i can get list of all such services, for e.g. some kind of documentation which i can refer and know that i can use something like LocalizationTables[<table_name>].AddToken({name: '', value: ''}); ?

Translate
19-Tanzanite
Jan 17, 2024 8:05 PM UTC

Hi @Vimal_Rawat,

Documentation per se is available here: https://support.ptc.com/help/thingworx_hc/javadoc/com/thingworx/resources/localization/RuntimeLocalizationFunctions.html

However typically we don't go there if we try to use those services, simply because the service editor in the ThingWorx Composer gives easy access to the services, in the Snippet section in this case, as @Bikash_Panda shared already. Hovering on them gives the exact explanations in the link above.

However, in addition to the Snippets, you can also choose to see in the "Me/entities" all the services of all the entities in the platform - also for Localization Tables.

These are features of the ThingWorx Composer that were in the platform since the beginning, and are crucial to know and use to have maximum efficiency.

VladimirRosu_0-1705521779423.png

 

Translate