I see, it seems i'd have to do some brute force string handling; replace the number between last " " and ")". With different locales i can't even assume the "of" with so many languages. But even that wouldn't work with japanese... something between number and ")". So just try to find the number alone i guess.
deadlock-stacking-stack=__1__ (stack of __2__)
deadlock-stacking-stack=__1__ (пачка из __2__)
deadlock-stacking-stack=__1__ (__2__個のスタック)
deadlock-stacking-stack=__1__ (pila di __2__)
deadlock-stacking-stack=__1__ (pile de __2__)
I mean the way deadlocks mod looks up the base item name is exactly the same way as i use, but yes at that point it's already modified.
Or if i can find a way to recreate the base localized name, it's probably possible too.