Browse Tasks

Select category

Select category

Select category

Select category

Select Task

Select Task

Select Task

Select Task

Select Tasks

Select Industry

Code Review

Pull Request Summary

Commit Message Review

Error Log Analysis

Test Case Generation

Internationalisation (i18n) Implementation

Prompt Enhancement

CRM

Internationalisation (i18n) Implementation

This Task automates the process of identifying hardcoded strings in code and suggesting replacements with localisation function calls. Designed for use by Software Developers, Localisation Specialists, and Internationalisation Teams, the system performs the following functions:

  • Scans code files to identify hardcoded string literals

  • Analyses the context of each string to determine if it's a candidate for localisation

  • Suggests appropriate localisation function calls for each identified string

  • Generates a list of strings to be added to localisation resource files

  • Provides recommendations for structuring localisation keys

  • Identifies potential localisation issues, such as concatenated strings or date/time formats


It is designed to integrate with version control systems, integrated development environments (IDEs), and localisation management platforms. The template can be adapted to address specific localisation requirements and function call conventions within an organisation's development framework. This customisation allows for tailored improvements in internationalisation processes, consistency in localisation practices, and overall global user experience.

Example outputs:

{
  "identified_strings": [
    "Welcome to our application!",
    "Please enter your name:",
    "Hello, {name}! Your account was created on {date}.",
    "Error:Invalid input"
  ],
  "suggested_replacements": [
    "t('welcome_message')",
    "t('enter_name_prompt')",
    "t('greeting_with_date', { name:name, date:formattedDate })",
    "t('error.invalid_input')"
  ],
  "localisation_keys": [
    "welcome_message",
    "enter_name_prompt",
    "greeting_with_date",
    "error.invalid_input"
  ],
  "potential_issues": [
    "Date formatting may need to be localised",
    "Concatenated string in greeting message may cause issues in some languages"
  ],
  "resource_file_additions": {
    "en": {
      "welcome_message": "Welcome to our application!",
      "enter_name_prompt": "Please enter your name:",
      "greeting_with_date": "Hello, {name}! Your account was created on {date}.",
      "error.invalid_input": "Error: Invalid input"
    }
  },
  "code_modifications": "console.log(t('welcome_message'));\nconst name = prompt(t('enter_name_prompt'));\nconst formattedDate = new Intl.DateTimeFormat(locale).format(accountCreationDate);\nconsole.log(t('greeting_with_date', { name: name, date: formattedDate }));\nif (invalidInput) {\n  console.error(t('error.invalid_input'));\n}",
  "internationalisation_score": 7,
  "additional_recommendations": "Consider using a date formatting library that supports localisation, such as Moment.js or date-fns. Also, ensure that all user-facing strings, including error messages and tooltips, are extracted for localisation."