Replacing/Translating multi string values to other international language
-
Hi guys, a newbie here
I have a strings.xml file.
Is there a way to replace or translate multi string values to other international language
<string name=“jewellery”>Jewellery</string>
<string name=“photo_editor”>Photo Editor</string>
<string name=“gallery”>Gallery</string>
so basicaly I want to translate Jewellery, Photo Editor and Gallery from english to any other language of choice.
Thanks in advance
-
Do you have a list of the words/phrases to translate, and then the various translations, a possible short example might be:
Jewellery,Joyas,Bijoux Gallery,Galería,Galerie
-
Yes I have or I can mark copy the string values and use google translate.
-
It’s hard to anticipate the larger framework of what you’re doing, in order to know what advice to provide, but with what you’ve given, if I were doing it, I’d think in terms of a “mail merge” (also a shameless plug for my recent script for such a thing).
Let’s consider the technique shown in THIS THREAD for your situation.
I’d prepare a “template” file/tab:
----<LANG>---- Hi guys, a newbie here I have a strings.xml file. Is there a way to replace or translate multi string values to other international language <string name="jewellery"><JEWELLERY></string> <string name="photo_editor"><PHOTO EDITOR></string> <string name="gallery"><GALLERY></string> so basicaly I want to translate <JEWELLERY>, <PHOTO EDITOR> and <GALLERY> from english to any other language of choice. Thanks in advance
and a “data table” file/tab:
<LANG>|<JEWELLERY>|<PHOTO EDITOR>|<GALLERY> English|Jewellery|Photo Editor|Gallery Spanish|Joyas|Editora de fotos|Galería French|Bijoux|éditeur de photos|Galerie
Then I’d run the “mail merge” to obtain:
----English---- Hi guys, a newbie here I have a strings.xml file. Is there a way to replace or translate multi string values to other international language <string name="jewellery">Jewellery</string> <string name="photo_editor">Photo Editor</string> <string name="gallery">Gallery</string> so basicaly I want to translate Jewellery, Photo Editor and Gallery from english to any other language of choice. Thanks in advance ----Spanish---- Hi guys, a newbie here I have a strings.xml file. Is there a way to replace or translate multi string values to other international language <string name="jewellery">Joyas</string> <string name="photo_editor">Editora de fotos</string> <string name="gallery">Galería</string> so basicaly I want to translate Joyas, Editora de fotos and Galería from english to any other language of choice. Thanks in advance ----French---- Hi guys, a newbie here I have a strings.xml file. Is there a way to replace or translate multi string values to other international language <string name="jewellery">Bijoux</string> <string name="photo_editor">éditeur de photos</string> <string name="gallery">Galerie</string> so basicaly I want to translate Bijoux, éditeur de photos and Galerie from english to any other language of choice. Thanks in advance
Then, if I were interested in the representation of the original data in Spanish, for example, I’d find that section in the output, and copy it to a new file/tab or wherever I needed it to be.
If you wanted a semi-automated way of copying the data from the results, you could make a macro of a Mark All operation for regex
^----Spanish----\R\K(?s).*?(?=^----|\z)
, adding a Copy Marked Text to the macro after the mark. Then copying the data becomes as simple as running a macro (well, one macro per language). -
@Alan-Kilborn
Thank you, will check the plug for merging and let you know how it went. Yes, theoretically what you advised should solve my prob. -
Luckily I found solution, a script.
Script could be found here in action:
https://asrt.gluege.boerde.de/Source:
https://github.com/Ra-Na/GTranslate-strings-xmlThanks for helping tho.
-
@Faseeh-Shah said in Replacing/Translating multi string values to other international language:
Luckily I found solution, a script.
If that’s what you were looking for, you shouldn’t have asked your original question in a Notepad++ forum, as it is OFF-TOPIC.
Here we only deal with what Notepad++ can do for you, and what you can do with it.
In other words, your question must be related to Notepad++ in some way. Your question was NOT.
-