September 16, 200421 yr I have developed a new module for FS, accessed through the FS pull-down menus. Instead of adding a new entry in the menu bar (PMDG adds one, Lago adds one,... so there is no much room left), I would like to add my option into an existing pull-down menu, such as "Aircraft" for example.I know how to do this, but the problem I have is that the "Aircraft" statement appears differently, depending on the FS internationalization. It will appear as "Avion" in French, "Flugzeug" in German, etc...So How can I add an option in the "Aircraft" menu if the menu title is different in each country?Any clue is welcome.Eric My Web Site
September 17, 200421 yr Eric, good question. Let me try to answer the localization issue:The way this is done with standard windows programming is to have multiple resource files containing the strings for specific languages.One way to duplicate from inside FS might be from your main module figure out what the current locale is, use the "LoadLibrary" function to load the localized resource DLL you need, and then populate the menu with resource strings from that library (since you can load resources from any DLL including your gauge just by using the handle the LoadLibrary call gives you).This lets you use the same IDs for each resource and use multiple languages without changing your code. Just remember to have one default set (or locale neutral) just in case.In .NET, things are a little easier because the resource file is localized for you and the resource manager does a lot of the footwork for you.Edit: one more thing - you can create a "Resource only" DLL from within the VS environment. This is marked in the DLL file as having no code, just resources.Hope this helps.
Create an account or sign in to comment