Jump to content

Welcome to eMastercam

Register now to participate in the forums, access the download area, buy Mastercam training materials, post processors and more. This message will be removed once you have signed in.

Use your display name or email address to sign in:

Multi language Application


Recommended Posts

Hello,

I use Mcam 2020 Version, and try to make some applications with Vb.net and VS2019.

I have try to create a multi-lingual application, with separated  language files.
First i have try to make a basic application with a simply windows form:
 i have add to my project three resources files:

image.png.ae290bef22170ae5df819e58471d1941.png

On each, two values:

AppMess.resx:

Button1 | Button1

Label1 | Label1

AppMess.en.resx:

Button1 | French

Label1 | TITLE

AppMess.fr.resx:

Button1 | Anglais

Label1 | TITRE

I have add a very simple Form (Form1) to my project, with only one Label and one button,  and write this code:

Imports MultilingualAPP.My.Resources
Public Class Form1
    Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
        My.Application.ChangeUICulture("en-US")
        My.Application.ChangeCulture("en-US")
        Call actualize()
    End Sub

    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
        Dim RM As System.Resources.ResourceManager = New System.Resources.ResourceManager(GetType(Form1))
        If My.Application.UICulture.Name = "en-US" Then
            My.Application.ChangeUICulture("fr-FR")
            My.Application.ChangeCulture("fr-FR")
            Call actualize()

        Else
            My.Application.ChangeUICulture("en-US")
            My.Application.ChangeCulture("en-US")
            Call actualize()
        End If
    End Sub
    Private Sub actualize()
        Label1.Text = AppMess.Label1
        Button1.Text = AppMess.Button1
    End Sub
End Class
 

That's ok, each click on the button changed the form text language.

I have try to do exactly the same thing in a NET-Hooks C# and VB.NET project examples.

But in this project, no text change, that's only the default text (AppMess.resx) who is called... 

What is wrong?

Is there some modifications to make to the project?
What is the way to create a Multilingual application in a MC NET-Hook project?

I try to join my two trials, hope that will be usable...

Thantk's in advance!

 

MC_MultilingualAPP.zip

MultilingualAPP.zip

Link to comment
Share on other sites
  • 2 weeks later...

LMVUICHARD,

The different language-specific resources can be ->
In separate satellite DLLs placed in sub-folders such as "en-US" and "fr-FR",
or they can by embedded directly into the NET-Hook add-in DLL.
How you retrieve those resources will depend on which method you use.

Either through you dealer create a support ticket,
or email us directly sdk[at]mastercam[dot]com with you company contact information so we can create the ticket,
and we can help you out!

 

 

 

Link to comment
Share on other sites
8 hours ago, Mick George said:

Here is a link to a short but very good talk and demo of globalization of a .NET application

Internationalisation and Localisation in .NET

Very interesting talk, the part where he spoke about commas and periods being substituted based on language brought back some memories of a dark time when we used excel to modify our nc code zdepth. Instead of the zdepth being modified to( panel_thickness - .02) it interpreted it as (panel_thickness - 2.00) ergo the spindle head went crashing into the spoilboard. 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.

Join us!

eMastercam - your online source for all things Mastercam.

Together, we are the strongest Mastercam community on the web with over 56,000 members, and our online store offers a wide selection of training materials for all applications and skill levels.

Follow us

×
×
  • Create New...