Copy link to clipboard
Copied
What do I need to do, if I want multiple language support in my plugins? Please let me know the procedure to follow.
Thanks
Copy link to clipboard
Copied
Miles 33 wrote:
What do I need to do, if I want multiple language support in my plugins? Please let me know the procedure to follow.
Could you be more specific? Do you want to handle (accepting input and proper output) for different languages from your plugin? Or do you want to show different language GUI from your plugins?
Copy link to clipboard
Copied
Hi Peter,
I want to show the UI that supports multiple languages. Currently my UI supports only English. If I want to change the UI to someother language (like French, Germany, Portuguese,etc), then what is the procedure to implement this functionality? I'm new to InDesgin plugin programming and I have got already developed plugin that displays English in the widgets (buttons,etc.). I don't need to accecpt any input from the user. I just need to display in the UI.
Thanks
Copy link to clipboard
Copied
I just need different language GUI from my plugins.
Thanks
Copy link to clipboard
Copied
Miles 33 wrote:
I just need different language GUI from my plugins.
In CS4 SDK, there's a pdf file called "learning-indesign-plugin-development.pdf" and it has a chapter there that talks about Localization.
Also, the sample code "writefishprice" in the sdk supports both English and Japanese. You can follow that as an example.
HTH.
pete
Copy link to clipboard
Copied
Thank you. It can be done in CS3 also right? Because I want to implement in CS3.
Thanks.
Copy link to clipboard
Copied
Miles 33 wrote:
Thank you. It can be done in CS3 also right? Because I want to implement in CS3.
AFAIK, the mechanism is the same for CS3 and CS4.
pete
Copy link to clipboard
Copied
I tried a sample program similar to WriteFishPrice (one of the sample programs in SDK) to implement multi-language facility. My program displays in English. What do I need to do if I want the UI to display in Japanese? How can I do it forcibly in my program?
Thanks
Copy link to clipboard
Copied
Miles 33 wrote:
I tried a sample program similar to WriteFishPrice (one of the sample programs in SDK) to implement multi-language facility. My program displays in English. What do I need to do if I want the UI to display in Japanese? How can I do it forcibly in my program?
This is a "how to use your OS question"... set your locale or primary language for your Desktop OS or install the language version of the OS, then launch InDesign, your plugin should follow automatically if you have that language included in your plugin.
Copy link to clipboard
Copied
But I want to display the UI in some other langauge (say for example Japanese) even if my OS is set to English. I need to do it forcibly.
Copy link to clipboard
Copied
Miles 33 wrote:
But I want to display the UI in some other langauge (say for example Japanese) even if my OS is set to English. I need to do it forcibly.
I must say this is pretty unusual... why do you need to do that?
Copy link to clipboard
Copied
This is what the requirement. Our program can run Brazil but if they want the UI in Englsih they should have this option. So, it should not be dependent on the OS langauge. It should depend on the XML configuration file.
Copy link to clipboard
Copied
Miles 33 wrote:
This is what the requirement. Our program can run Brazil but if they want the UI in Englsih they should have this option. So, it should not be dependent on the OS langauge. It should depend on the XML configuration file.
Is this for Windows or Mac? The whole idea of this localization is that, you are working on a personal computer, so the language of choice should be unique to this user, hence a OS level user setting.
It almost sounds you are working in a "public" computer environment when the user(s) does not have access to the settings, so the customization will need to be done in the application level.
If this is on a Mac, you can sort of do that in a per application basis by setting the language preference for each application. The settings is under "Get Info" in Finder. The user would need to restart the application to see the language in effect (I just launch my TextEdit in Japanse when my OS has always been set to English). Of course you are going implement updating the GUI strings on the fly from your customization panel, right? 🙂
Copy link to clipboard
Copied
Our application should run on both Mac and Windows. It's basically not changing the languages often. But there should be an option where the user can select any language (from the list of languages for this application) by using the XML configuration file. So, my whole idea is to create XML files for each language (if we want to support 10 languages, we should create 10 XML files) which will contain the list of string keys and values. When we launch the applcation, the UI should load the strings from the corresponding XML file. There will be another XML configuration file where we can set the langauge. So, if we say Portuguese in the XML configuration file, the UI should get the strings from the corresponding XML file (where Portuguese strings are defined). This is my whole idea.
Thanks
Copy link to clipboard
Copied
Miles 33 wrote:
There will be another XML configuration file where we can set the langauge. So, if we say Portuguese in the XML configuration file, the UI should get the strings from the corresponding XML file (where Portuguese strings are defined). This is my whole idea.
How do you edit that "another XML configuration file"? A text editor or something in your plugin GUI?
What if your plugin is already running when someone edited that "another XML configuration file", what is the requirement for the user experience?
Copy link to clipboard
Copied
The user will not edit the XML configuration file when the plugin is running. (it's not basically meant for editing). We can define a language (not necessarily the same language of the OS) in the XML configuration file. This is done only during the installation of the plugin. Anyways, thanks for all your replies. I discussed with some of my colleagues, they suggested that using localized resoruce files is OK. So, now I need to develop the application with different resource files (.fr files) in plugin programming. As you mentioned in the earlier replies, if I have a Japanese resource file and if the default language of the OS is Japanese language, then it should display my plug-in UI in Japanese langauage right? (with the Japenese strings that I defined in the
_jaJP.fr). The required is being relaxed now. I will try to implement this. If I find any difficulties or issues. Will Post the queries then.
Thanks
Copy link to clipboard
Copied
Miles 33 wrote:
As you mentioned in the earlier replies, if I have a Japanese resource file and if the default language of the OS is Japanese language, then it should display my plug-in UI in Japanese langauage right? (with the Japenese strings that I defined in the
_jaJP.fr).
that's correct. You should be able to test it with the sample code quickly.
pete
Copy link to clipboard
Copied
Hi Peter,
Just a small question. Does the localization support any language or does it support only a limited number of languages?
Copy link to clipboard
Copied
Miles 33 wrote:
Just a small question. Does the localization support any language or does it support only a limited number of languages?
I expect only the language that's supported by InDesign. If this is on a Mac, you can open the InDesign package and see the list of languages.
pete
Copy link to clipboard
Copied
I did localization of strings in Arabic, I got an error. Below are the steps that I followed:
1. My Plugin project solution name is MyPlugin2
2. I created a resoruce file called MyPlugin2_arAE.fr
3. The content of the resource file is shown below
4. Then, I did the mapping in the main resource file as
kWildFS, k_arAE, kSDKDefStringsResourceID + index_arAE
5. I added the #include statement for MyPlugin2_arAE.fr as
#include "MyPlugIn2_arAE.fr" at the end of the file
6. When I tried compiling my program it gave the following error:
1>c:\MyProjects\MyPlugIn2\win\prj\MyPlugIn2_arAE.fr(1) : error R32762: # Error: Error looking for resource specification. Need 'resource' or 'type'.
1># Fatal error:
1>C:\SDK\AdobeInDesign\CS4\devtools\bin\odfrc - Execution terminated!
1>Project : error PRJ0019: A tool returned an error code from "Performing Custom Build Step"
Content of MyPlugin2_arAE.fr file
#ifdef __ODFRC__
// Japanese string table is defined here
resource StringTable (kSDKDefStringsResourceID + index_arAE)
{
k_arAE, // Locale Id
0, // Character encoding converter
{
// ----- Menu strings
kMyPlugIn2CompanyKey, kMyPlugIn2CompanyValue,
kMyPlugIn2AboutMenuKey, kMyPlugIn2PluginName "[AE]...",
kMyPlugIn2PluginsMenuKey, kMyPlugIn2PluginName "[AE]",
kMyPlugIn2DialogMenuItemKey, "Show dialog[AE]",
kSDKDefAboutThisPlugInMenuKey, kSDKDefAboutThisPlugInMenuValue_arAE,
// ----- Command strings
// ----- Window strings
// ----- Panel/dialog strings
kMyPlugIn2DialogTitleKey, kMyPlugIn2PluginName "[AE]",
// Drop-down list item strings
kMyPlugIn2DropDown1Item_1Key, "تصاعدي",
kMyPlugIn2DropDown1Item_2Key, "ترتيب",
kMyPlugIn2DropDown1Item_3Key, "تصفية",
kMyPlugIn2DropDown1Item_4Key, "تحديث",
// ----- Error strings
// ----- Misc strings
kMyPlugIn2AboutBoxStringKey, kMyPlugIn2PluginName " [AE], version " kMyPlugIn2Version " by " kMyPlugIn2Author "\n\n" kSDKDefCopyrightStandardValue "\n\n" kSDKDefPartnersStandardValue_arAE,
}
};
#endif // __ODFRC__
I know it is a small thing somewhere I'm missing. Could you please let me know how to solve this error?
Thanks
Copy link to clipboard
Copied
Basically, I need my application like this.
I will have an XML File, when I can define what language I want to display in the UI. The plugins will dispaly the langauge accroding to the settings in the XML configuration file. The compaute may be set to English[US] langauge. But if I say Japanese or Protuguese (or whatever language I define) in the XML File, the plugin should display that language in the UI. Please guide me on how to proceed to implement this.
Thanks
Copy link to clipboard
Copied
Miles 33 wrote:
Basically, I need my application like this.
I will have an XML File, when I can define what language I want to display in the UI. The plugins will dispaly the langauge accroding to the settings in the XML configuration file. The compaute may be set to English[US] langauge. But if I say Japanese or Protuguese (or whatever language I define) in the XML File, the plugin should display that language in the UI. Please guide me on how to proceed to implement this.
This is outside the normal support of localization from what I understood, which follows the locale set in the OS.
In your case, you need to "update" the strings yourself when the GUI is first shown. You can do that from an Observer. When the observer is called, you change the strings to your language of choice, according to your XML.
From what you told me, you would only need to do the English version. Swap the strings on the fly to your language of choice according to your XML in code would be the only way from what I know.
Copy link to clipboard
Copied
Thanks Peter,
I'm planning to create XML files and store the strings (of different langauges) in those XML files. so that I can update the UI in whatver language I like. This is my plan. Do you have any other better plans or thoughts?
Copy link to clipboard
Copied
Miles 33 wrote:
Thanks Peter,
I'm planning to create XML files and store the strings (of different langauges) in those XML files. so that I can update the UI in whatver language I like. This is my plan. Do you have any other better plans or thoughts?
Other than to encapsulate that layer in a class or as a set of functions to ease the programming, I can't think of anything else... although I still question the value this "feature"... to me, you are putting an OS feature into your plugin.
pete
Copy link to clipboard
Copied
But simply talking, I want different set of strings in the UI according to the language I specify in the XML configuration file. Anyway, I'm not going to get the input from the UI. Just need to disaply the strings in the UI.
 
					
				
				
			
		
 
					
				
				
			
		
Find more inspiration, events, and resources on the new Adobe Community
Explore Now