JSON Plugin - Page 2 - Forum

Forum Navigation
You need to log in to create posts and topics.

JSON Plugin

PreviousPage 2 of 2

@farhad2008

Files with the extension "loc" (from the word "localization") is one of the popular ways to translate plugins. This file allows users to translate plugin windows into their native language and share this file with others. For example, in Andrey Solodyankin's plugins, everything is originally in Russian, but he supplies a separate text file with the extension .loc, which lists the identifiers of strings to be translated into another language and the content of strings in English (these strings are the text in the plugin windows). If you put this loc file in the root folder of VisualNEO Win (or NeoBook), the plugin will be automatically translated into English. But you can make strings in your own language instead of English strings and the plugin will display them. This is convenient because with the help of translation sites you can automatically translate strings in two minutes and just replace loc file with your own. An example of text in the file, see the screenshot. But, of course, you can do localization in different ways. For instance, in the vlWord plug-in, I decided to put the file vlWord.loc not in the root folder of VisualNEO Win, but at the address \PlugIns\vlWord\Loc\ and created there separate RTF files for each command of the plug-in. The content of these RTF files is displayed in the command setup assistant window. These RTF files can also be translated into any language, and since the plugin supports Unicode, the plugin window can display both Persian and any other language. Of course, in the window of VisualNEO Win itself (in the command selector) you should use English (or any other language, but not Unicode), because VisualNEO Win does not support Unicode.
You can simply add a localization function to the plug-in's code which will work and put the text from the loc file into the title of the object you need, if this file is found in a place known to the plug-in. And if the loc file is not found, the default text will remain in the object header.

 

Uploaded files:
  • You need to login to have access to uploads.
farhad2008, CN_Iceman and rcohen have reacted to this post.
farhad2008CN_Icemanrcohen
PreviousPage 2 of 2