I may be a bit late to the party as I just discovered this thread.
Congratulations, Wisp, your proposal looks like it covers the most typical use a modder could do in a very simple and elegant way.
However I have a few cases to report that don't seem to be covered by the current function. I'm not sure, however, that you should change anything. More likely the mod that don't fit could be adjusted to fit.
Would it be possible to add some extra extension or be allowed to specify one in the file names (so that ".tra" is not added in that case) without making the code much more complex? Currently BG2 Tweaks uses two tpa files that contain texts for a replace action intending to update item descriptions, for instance. In French, these texts use special characters and they are likely to crash BGEE if not converted (I don't remember if I checked specifically with item descriptions).
The mod could probably be adjusted to move the texts used in the REPLACE in a tra file and write a unique tpa for all languages.
Another particular case I can think of is Secret of Bonehill that use a sub-folder of %LANGUAGE% for tra files. Secret of Bonehill also uses %LANGUAGE% folder for the tra files used for setup (so the reload can still work as intended for these files). It looks like the ACTION_BASH command used will only find them in the %LANGUAGE% directory.
I assume such case can be covered by specifying the list of files in their respective folders in %convert_array%, provided the "/" in "folder/file" does not break the code. Or maybe moved them all in the %LANGUAGE% folder.
I know another mod, a french kit mod, that has all its tra files in a sub-folder of %LANGUAGE%. It has been adapted to EE by including two sets of files, so that case is not really an issue. I don't know if there are other mods using such organisation.
Finally I was thinking of BP-BGT-Worldmap as another special case due to the additional worldmap directory. You know it better that I, so I guess you probably thought of it as well.
Alternatives for language names
In the same spirit as for "polski", which I think is native way of naming the language, here are those names for other languages :
French : francais
Spanish : espanol or castellano
German : deutsch
Italian : italiano
I can confirm those names are used in some mods, Kiara-Zaiya and BGQE to name a few.