peter-frentrup / NppMenuSearch

Notepad++ Menu Search Plugin
Other
39 stars 11 forks source link

Is NppMenuSearch translatable? #43

Open conky77 opened 1 week ago

conky77 commented 1 week ago

I would like to translate NppMenuSearch into Italian. Is that possible?

peter-frentrup commented 1 week ago

Sadly, that is currently not technically possible. The texts are hard-coded in the source code. I would need to make those configurable first. Then I would need to find out, which localization is currently selected in Notepad++ and get informed whenever that is changed. There does not seem to exist an API for this information.

I put that idea on my long term to-do list. It will probably not happen anytime soon :-/

peter-frentrup commented 1 week ago

Actually, indirectly I can find out which the current localization is by reading %appdata%\Notepad++\nativeLang.xml, which I already do. I even already intercept the undocumented internal Notepad++ message "NPPM_INTERNAL_RELOADNATIVELANG" (see NppListener.cs: https://github.com/peter-frentrup/NppMenuSearch/blob/dfb33852fbc92dcc85ddc317a0294926e821bbcb/NppMenuSearch/NppListener.cs#L26-L28) What remains then is to load the user visible texts from a configuration file instead of hard-coding them and to dynamically apply them. Still I cannot promise that I find the time in the upcoming months. But I like the idea.

conky77 commented 1 week ago

@peter-frentrup if it helps, the author of "json Tools" is working on translation

In the forum you can see other two plugins that are translatable: HexEdit: MultiReplace