MV SRD Translation engine: Multiple image translation.

So, i got a problem using this plugin cause i wanted to translate my game to another languages. (First language is spanish haha).

The thing is, i wanted translate more than 2 images just for one scene, and when i'm starting the game, it just changes 1 single image.

So, anyone can help me?

[English] || [Spanish]

1781308311110.png
1781308334322.png
How did you name the stuff? I quickly ctrl-Fd the code and the image gets changed like below.

I didn't have motivation to read how the matches work, but don't know why the code wouldn't work for some image ids.

You should show screenshots how you named your images etc.
You can also put a console.log("TEST"); line in the code after the try { to check if it's working in all cases. ( edit: or I guess put it after the catch(e){ )

$.ImageManager_loadBitmap = ImageManager.loadBitmap;
ImageManager.loadBitmap = function(folder, filename, hue, smooth) {
if(!ConfigManager.isDefaultLanguage() && filename.match(/_\[Original\]$/)) {
var lang = ConfigManager.getLanguage();
var name = filename.slice(0, -11) + '_[' + lang + ']';
try {
return $.ImageManager_loadBitmap.call(this, folder, name, hue, smooth);
} catch(e) {
return $.ImageManager_loadBitmap.apply(this, arguments);
}
}
return $.ImageManager_loadBitmap.apply(this, arguments);
};
How did you name the stuff? I quickly ctrl-Fd the code and the image gets changed like below.

I didn't have motivation to read how the matches work, but don't know why the code wouldn't work for some image ids.

You should show screenshots how you named your images etc.
You can also put a console.log("TEST"); line in the code after the try { to check if it's working in all cases. ( edit: or I guess put it after the catch(e){ )

$.ImageManager_loadBitmap = ImageManager.loadBitmap;
ImageManager.loadBitmap = function(folder, filename, hue, smooth) {
if(!ConfigManager.isDefaultLanguage() && filename.match(/_\[Original\]$/)) {
var lang = ConfigManager.getLanguage();
var name = filename.slice(0, -11) + '_[' + lang + ']';
try {
return $.ImageManager_loadBitmap.call(this, folder, name, hue, smooth);
} catch(e) {
return $.ImageManager_loadBitmap.apply(this, arguments);
}
}
return $.ImageManager_loadBitmap.apply(this, arguments);
};
I named the images in that way, i'm using spanish as main language to make my proyect, and because i got some progress, but if i need make english as main language i'm not sure about.
(Sorry for my bad english).

The translation on messages is doing good anyways.
1781364827465.png
Some of your files have the _ in wrong spot?

You have:
Warning_[Language]
Warning_Text[Language]
Some of your files have the _ in wrong spot?

You have:
Warning_[Language]
Warning_Text[Language]
Yes, i got the _ in a wrong spot...

1781366310049.png


feeling a bit dumb right now.
Anyways thank you for the help.

Original thread: https://forums.rpgmakerweb.com/threads/srd-translation-engine-multiple-image-translation.184009/