How to replace all numbered ID with a list of name in different languages
-
So i have a master txt file that contain some keyword of an item ID, for example
ID0001
ID0002
ID0003Then i want to make a copy of that and replace all IDxxxx into a name that match the ID but in different languages, like:
ID0001, Bicycle, Fahrrad, Bicicletta
So essentially replace id0001 into bicycle in different languages, but just one language for one copy of the files
-
@Farhan-Syabibi
This is a job for a scripting language like Python or PowerShell. If you need help writing scripts in a scripting language, this is the wrong place to ask questions.Somebody else might chime in with a way to use Notepad++ builtin functionality or plugins to solve your problem, but IMO that is much less efficient than just using a scripting language.
-
@Farhan-Syabibi
You can achieve this with the MultiReplace Plugin, but for simplicity, I recommend splitting the replacement tasks into different languages.To do this, create a replacement list in the MultiReplace Plugin that looks like this:

You can also generate the Replacement list as it is stored in CSV format.
-
I gave a more advanced version with MultiReplace a go. But try version of the previous post first.
Enable ‘Use Variables’ before adding each line into the list.
By changing the number for LANG in the init part from 1 to 3, you can switch between the language replacements. Just right click on the entry and choose 'Edit Field ’ in the Context menu.
But I have to mention. It is necessary to combine the init command with a single match that appears first in the document; otherwise, the init will not be triggered and the following lines are failing. Or you put the init into each line.
So list look finally like this:

Simply copy-paste this raw data into the replacement list, for testing:
1,"ID0001","init({LANG=3});set((({""Bicycle"", ""Fahrrad"", ""Bicicletta""})[LANG]) );",0,0,1,0,0 1,"ID0002","set(({""Mountain Bike"", ""Mountainbike"", ""Bicicletta da montagna""})[LANG]);",0,0,1,0,0 1,"ID0003","set(({""Airplane"", ""Flugzeug"", ""Aeroplano""})[LANG]);",0,0,1,0,0 -
@Thomas-Knoefel
I see, thanks i will try that later
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login