Skip to content

Conversation

@bird-03
Copy link
Contributor

@bird-03 bird-03 commented Oct 4, 2025

PR Description:

Pull Request Checklist

Overview

  • I have read and understood the CONTRIBUTING.md guidelines
  • My pull request has a descriptive title that accurately reflects the changes
  • I've included only files relevant to the changes described in the PR title and description
  • I've created a new branch in my forked repository for this contribution

Code Quality

  • My code is relevant to ServiceNow developers
  • My code snippets expand meaningfully on official ServiceNow documentation (if applicable)
  • I've disclosed use of ES2021 features (if applicable)
  • I've tested my code snippets in a ServiceNow environment (where possible)

Repository Structure Compliance

  • I've placed my code snippet(s) in one of the required top-level categories:
    • Core ServiceNow APIs/
    • Server-Side Components/
    • Client-Side Components/
    • Modern Development/
    • Integration/
    • Specialized Areas/
  • I've used appropriate sub-categories within the top-level categories
  • Each code snippet has its own folder with a descriptive name

Documentation

  • I've included a README.md file for each code snippet
  • The README.md includes:
    • Description of the code snippet functionality
    • Usage instructions or examples
    • Any prerequisites or dependencies
    • (Optional) Screenshots or diagrams if helpful

Restrictions

  • My PR does not include XML exports of ServiceNow records
  • My PR does not contain sensitive information (passwords, API keys, tokens)
  • My PR does not include changes that fall outside the described scope

his SI is a translationUtil to for dynamic language translation for example english to French

This script include for language translation will invoke flow designer action and sublfow to do the dynamic language transaltion
Script include is  created as translationUtil for dynamic language translation.  for example english to French

This script include for language translation will invoke flow designer action and sublfow to complete the real time language transaltion for instance suppose group table is updated with new group record having english as description text that can't be translated using OOTB translation tables in such scenario this UTIL will be a saviour
@ravichandra1998g ravichandra1998g self-assigned this Oct 5, 2025
@am-shakeel
Copy link
Contributor

@bird-03 - Description is missing, Please add

Copy link
Contributor

@ravichandra1998g ravichandra1998g left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello @bird-03
What are the flow and flow actions the script is calling?

If they are not OOB, the code snippet wouldn't serve the complete purpose to achieve the use case.

also explain in detail what this UTIL does (the process happening to send correct inputs to flows) as we also have OOB dynamic translation within ServiceNow.

@ravichandra1998g
Copy link
Contributor

closing this for now. reopen this PR or open a new one after making the changes.

@bird-03
Copy link
Contributor Author

bird-03 commented Oct 5, 2025

Hey @am-shakeel

This PR created for script include that contain TranslationUtil script and readme file that descrive 'How it server the purpose for Dynamic field translation using specific translator'

It will Fetches and calculates runtime limits for translation requests from system properties. Further it will dynamically retrieves the translation API key using getSubscriptionKey().

The scope of this utility ranges from multilingual support based on the user's preferred language to dynamic field translation through integration with Flows and Actions.

@ravichandra1998g
What you mean by OOB? How this limits it usage. Not sure what you're as by complete purpose to achieve the use case. Though I am adding more details as following that will help to understand.

The scope of this PR & SI to provide a translationUtil, the custom flow action and subflow is not within the scope of this Util, if anyone wants to use it they need to create there own subflow that detect and translate the language by using this SI.

Details of Utils

  • TranslationUtils is a custom Script Include, created to manage dynamic text translation and language detection without depending on ServiceNow’s Out-of-the-box (OOTB) Translation plugin (like Dynamic Translation or Localization framework).

How it Works?

  • It will look for Custom REST connections (via http_connection and api_key_credentials)
  • Flow actions / subflows for actual translation and detection (global.detect_language, global.hhfksjhd__translate_text)
  • Custom batching, size limits, and buffer logic to optimize translation requests and avoid API overflows.
  • This SI will do the translation & detection of texts & give the translated data as JSON output

HOPE THIS HELPS TO CLARIFY.

@bird-03 bird-03 reopened this Oct 5, 2025
Copy link
Contributor

@ravichandra1998g ravichandra1998g left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello @bird-03 ,

Your explanation of scope of the PR is very helpful, add the same to the readme file that helps understand the use case and context.

README file is updated with util description
@bird-03
Copy link
Contributor Author

bird-03 commented Oct 5, 2025

@ravichandra1998g

Thanks, DONE. README file updated.

Copy link
Contributor

@ravichandra1998g ravichandra1998g left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

approved.

@ravichandra1998g ravichandra1998g merged commit 5428969 into ServiceNowDevProgram:main Oct 5, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants