Sign in to follow this  
Guest zip

Adding a new option to the FS menus

Recommended Posts

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

Share this post


Link to post
Share on other sites
Help AVSIM continue to serve you!
Please donate today!

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.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this