Hide Table of Contents

Get Language and Localized Menu Names Example (VBA)

This example shows how to get the current language used by the SolidWorks application and the names of some of the menus in the local language.

 

'----------------------------------------------

'

' Preconditions: None

'

' Postconditions: None

'

'----------------------------------------------

Option Explicit

 

Public Enum swMenuIdentifiers_e

    swFileMenu = 0

    swEditMenu = 1

    swViewMenu = 2

    swInsertMenu = 3

    swToolsMenu = 4

    swWindowMenu = 5

    swHelpMenu = 6

    swDeveloperToolsMenu = 7

    swViewToolbarsMenu = 8

End Enum

 

Sub main()

    Dim swApp  As SldWorks.SldWorks

    

    Set swApp = Application.SldWorks

    

    Debug.Print "Language = " + swApp.GetCurrentLanguage

    Debug.Print "  FileMenu             = " + swApp.GetLocalizedMenuName(swFileMenu)

    Debug.Print "  EditMenu             = " + swApp.GetLocalizedMenuName(swEditMenu)

    Debug.Print "  ViewMenu             = " + swApp.GetLocalizedMenuName(swViewMenu)

    Debug.Print "  InsertMenu           = " + swApp.GetLocalizedMenuName(swInsertMenu)

    Debug.Print "  ToolsMenu            = " + swApp.GetLocalizedMenuName(swToolsMenu)

    Debug.Print "  WindowMenu           = " + swApp.GetLocalizedMenuName(swWindowMenu)

    Debug.Print "  HelpMenu             = " + swApp.GetLocalizedMenuName(swHelpMenu)

    Debug.Print "  DeveloperToolsMenu   = " + swApp.GetLocalizedMenuName(swDeveloperToolsMenu)

    Debug.Print "  ViewToolbarsMenu     = " + swApp.GetLocalizedMenuName(swViewToolbarsMenu)

End Sub

 

'Language = english

'FileMenu = &File

'EditMenu = &Edit

'ViewMenu = &View

'InsertMenu = &Insert

'ToolsMenu = &Tools

'WindowMenu = &Window

'HelpMenu = &Help

'DeveloperToolsMenu = &DeveloperTools

'ViewToolbarsMenu = &Toolbars

 

'Language = spanish

'FileMenu = &Archivo

'EditMenu = &Edición

'ViewMenu = &Ver

'InsertMenu = &Insertar

'ToolsMenu = &Herramientas

'WindowMenu = Ven&tana

'HelpMenu = &?

'DeveloperToolsMenu = &DeveloperTools           

'ViewToolbarsMenu = Barras de &herramientas

 

'Language = french

'FileMenu = &Fichier

'EditMenu = &Edition

'ViewMenu = Affic&hage

'InsertMenu = &Insertion

'ToolsMenu = &Outils

'WindowMenu = Fe&nêtre

'HelpMenu = &?

'DeveloperToolsMenu = &DeveloperTools           

'ViewToolbarsMenu = &Barre d'outils

 

'Language = german

'FileMenu = &Datei

'EditMenu = &Bearbeiten

'ViewMenu = &Ansicht

'InsertMenu = &Einfügen

'ToolsMenu = E&xtras

'WindowMenu = &Fenster

'HelpMenu = &Hilfe

'DeveloperToolsMenu = En&twickler

'ViewToolbarsMenu = S&ymbolleisten

 

'Language = italian

'FileMenu = &File

'EditMenu = &Modifica

'ViewMenu = &Visualizza

'InsertMenu = &Inserisci

'ToolsMenu = &Strumenti

'WindowMenu = Fi&nestra

'HelpMenu = &?

'DeveloperToolsMenu = &DeveloperTools       

'ViewToolbarsMenu = &Barre degli strumenti

 

'Language = japanese

'FileMenu = ̧²Ù(&F)

'EditMenu = •ÒW(&E)

'ViewMenu = •\Ž¦(&V)

'InsertMenu = ‘}“ü(&I)

'ToolsMenu = °Ù(&T)

'WindowMenu = ³¨ÝÄÞ³(&W)

'HelpMenu = ÍÙÌß(&H)

'DeveloperToolsMenu = ŠJ”­Â°Ù(&D)

'ViewToolbarsMenu = °ÙÊÞ°(&T)

'--------------------------------------------

  



Provide feedback on this topic

SOLIDWORKS welcomes your feedback concerning the presentation, accuracy, and thoroughness of the documentation. Use the form below to send your comments and suggestions about this topic directly to our documentation team. The documentation team cannot answer technical support questions. Click here for information about technical support.

* Required

 
*Email:  
Subject:   Feedback on Help Topics
Page:   Get Language and Localized Menu Names Example (VBA)
*Comment:  
*   I acknowledge I have read and I hereby accept the privacy policy under which my Personal Data will be used by Dassault Systèmes

Print Topic

Select the scope of content to print:



x

We have detected you are using a browser version older than Internet Explorer 7. For optimized display, we suggest upgrading your browser to Internet Explorer 7 or newer.

 Never show this message again
x

Web Help Content Version: API Help (English only) 2013 SP05

To disable Web help from within SOLIDWORKS and use local help instead, click Help > Use SOLIDWORKS Web Help.

To report problems encountered with the Web help interface and search, contact your local support representative. To provide feedback on individual help topics, use the “Feedback on this topic” link on the individual topic page.