Best practices for resizing dialogs when translating text
-
Recently I implemented a simple protocol for allowing native language translation for JsonTools and NppCSharpPluginPack. This protocol includes translation of text boxes and labels in forms.
The problem that I’ve been wrestling with is that the default spatial arrangement of elements in the form stops working if the translated text of a label gets too large, causing it to overlap with other controls. In the JsonToolsNppPlugin repo on GitHub, se JsonToolsNppPlugin/Utils/Translator.cs for my existing algorithm that deals with this issue. At present, it seems like my algorithm works OK for most things but starts to get weird if things are right- or left-anchored.
Does anyone else who has some experience with this problem have any general tips?
EDIT: Yes, I know this is more of a meta problem and not really specific to Notepad++. I beg your indulgence nonetheless.