【Tips & Tricks】Convert British English to American English Using a Conversion File

Have you ever needed to convert multiple text patterns at once?
For example, you may want to standardize British English spellings into American English, such as:

colour → color

This is where the “Replace string using conversion file” function comes in handy.

By preparing a CSV file that pairs the original text with the replacement text in advance, you can manage multiple conversion rules in one place instead of setting up replacements one by one.
It also allows you to handle many different conversion patterns at once.

In this example, we will show you how to convert British English spellings into American English using this method.

Preparation

Create a CSV file for the conversion and save it in any location.
As shown below, enter the column headers in the first row. From the second row onward, enter the original text and the replacement text, separated by a comma.

You can also download and use the sample CSV file for British English → American English conversion here.
british_to_american_english.csv(1KB)

How to Configure

Here are the steps to usig the CSV file for British English → American English conversion to configure the text replacement.

  1. From the “Function / Script” menu, select “Additional script.”
  1. Under “String Manipulation,” select “Replace string using conversion file.”
  1. Configure the settings as follows:
    • Target string: colour
    • Conversion file: C:\Users\user\Desktop\british_to_american_english.csv
    • Encoding: Leave blank
    • Result: Create a data destination named “ConvertedText” and select it

When executed, the converted string will be stored in the “ConvertedText” data destination.

Additional Notes

  • You can also use a data save destination (variable) the target string, making it useful for converting text retrieved during repeated operations.
  • This method can be used not only for converting British English into American English, but also in cases such as:
    • Standardizing inconsistent terminology or spelling
    • Replacing product codes with product names
    • Replacing employee IDs with employee names
    • Replacing ZIP/postal codes with city or region names
    • Replacing abbreviations with full names
  • Because conversion rules are managed in the CSV file, they can be easily added or modified when needed.

Summary

Using “Replace Strings Using a Conversion File,” you can manage multiple replacement rules in a CSV file and convert strings all at once.
In addition to converting British English into American English, it can also be used to standardize text variations or replace codes with corresponding names.
If you have many replacement patterns to manage, give this function a try.

よかったらシェアしてね!
  • URLをコピーしました!
目次