View Single Post
11/01/22, 06:41 AM   #2
Baertram
Super Moderator
 
Baertram's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 5,012
There are multiple ways to overwrite localization files of other addons:

If they e.g. include a folder in their addon's zip file which overwrites the other addons folder/files.
Or if the other addon's i81n files are globally accessible.
Or if the other addon is using ZOs vanilla way of adding i18n via ZO_CreateStringId, then other addons can create the same with a higher version overwriting them.


For your use case:
I cannot imagine any way to achieve what you like to, or I missunderstand what you need?
I think you can have 1 fallback language, e.g. using ZO_CreateStringId and always laoding the en.lua file first, then load the <$Lang>.lua file.
or if you have a custom i18n table you my use metatables of lua to always find the "en" table entry if the current client language is missing that particular string.

But if you want to find another "fallback" you need to "point" to that, either globally for your whole addon using metatables, or manually per string in your addon's respective i18n table/file.


If you want to have more logic you need to write an addon doing this and "overwriting" as described in my first lines of this post.

Last edited by Baertram : 11/01/22 at 07:19 AM.
  Reply With Quote