Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Suite Pro
  New Posts New Posts RSS Feed - Multi-Language-Support
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Multi-Language-Support

 Post Reply Post Reply
Author
Message
finn View Drop Down
Groupie
Groupie
Avatar

Joined: 11 February 2005
Location: Germany
Status: Offline
Points: 60
Post Options Post Options   Thanks (0) Thanks(0)   Quote finn Quote  Post ReplyReply Direct Link To This Post Topic: Multi-Language-Support
    Posted: 11 February 2005 at 8:38am

Hello!

I'm from Germany and I can't speak and write English very well. But I hope, that you still unterstand me.

I want to apply the German language to my application and in the "Product Feature Chart" there I read, that most of the controls supports Multi-Language. I'm programming with Microsoft Visual Basic 6.0 Enterprise Edition and I've got the XtremeSuite Professional.

I hope, that you can help me.

Back to Top
SuperMario View Drop Down
Admin Group
Admin Group
Avatar

Joined: 14 February 2004
Status: Offline
Points: 18057
Post Options Post Options   Thanks (0) Thanks(0)   Quote SuperMario Quote  Post ReplyReply Direct Link To This Post Posted: 11 February 2005 at 8:43am
Hi,

(This should be in the ActiveX forum)

This is very easy (See multi-Language sample where German is used in sample)

CommandBarsGlobalSettings.ResourceFile = "XTPResourceDe.dll"
DockingPaneGlobalSettings.ResourceFile = "XTPResourceDe.dll"
etc.....

Back to Top
finn View Drop Down
Groupie
Groupie
Avatar

Joined: 11 February 2005
Location: Germany
Status: Offline
Points: 60
Post Options Post Options   Thanks (0) Thanks(0)   Quote finn Quote  Post ReplyReply Direct Link To This Post Posted: 11 February 2005 at 8:50am

Sorry, that I posted this topic in the wrong forum.

Thank you for your very quick answer!

Back to Top
finn View Drop Down
Groupie
Groupie
Avatar

Joined: 11 February 2005
Location: Germany
Status: Offline
Points: 60
Post Options Post Options   Thanks (0) Thanks(0)   Quote finn Quote  Post ReplyReply Direct Link To This Post Posted: 11 February 2005 at 9:00am

I've got one more question to the menu of the ShortcutBar, when you click on the button, where you can see the menu with the entries

  • Show more buttons
  • Show less buttons

I want to translate this text into German and I want to have this menu in the Office 2003-Style.

I hope you can help me with this, too!

Back to Top
SuperMario View Drop Down
Admin Group
Admin Group
Avatar

Joined: 14 February 2004
Status: Offline
Points: 18057
Post Options Post Options   Thanks (0) Thanks(0)   Quote SuperMario Quote  Post ReplyReply Direct Link To This Post Posted: 11 February 2005 at 11:27am
Yes, you can do this too.

Here is a code sample from the Outlook 2003 Sample.  Use the ExpandButtonDown to create your own popup menu and you can use the text of your choice like in the Multi-Language sample.
This code is from the new version so it is not yet shown in the version you have.  The new version should be out next week, but this code should work in the current verion.  It would go in the frmShorcutBar form of the Outlook 2003 sample. (Icon code removed because it was using new featuers)


'Shortcutbar constants
Public Const SHORTCUT_INBOX = 300
Public Const SHORTCUT_CALENDAR = 301
Public Const SHORTCUT_CONTACTS = 302
Public Const SHORTCUT_TASKS = 303
Public Const SHORTCUT_NOTES = 304
Public Const SHORTCUT_FOLDER_LIST = 305
Public Const SHORTCUT_SHORTCUTS = 306
Public Const SHORTCUT_JOURNAL = 307

Public Const SHORTCUT_SHOW_MORE = 308
Public Const SHORTCUT_SHOW_FEWER = 309

Public Const SHORTCUT_NAVIGATE_PANE_OPTIONS = 310
Public Const SHORTCUT_ADD_REMOVE_BUTTONS = 311



Private Sub wndShortcutBar_ExpandButtonDown(CancelMenu As Boolean)

    'Cancels the default menu that is displayed when the expand button is pressed.
    'The default button only displays the "Show More Buttons" and "Show Fewer Buttons" commands.
    CancelMenu = True

    Dim Popup As CommandBar
    Dim Control As CommandBarControl
    Dim SubControl As CommandBarControl
    Dim i As Long
    Dim Item As ShortcutBarItem
    Dim iOffset As Integer
    iOffset = 30
   
    Dim CommandBars As CommandBars
    Set CommandBars = frmMain.CommandBars
   
    'Creates a popup command bar
    Set Popup = CommandBars.Add("Popup", xtpBarPopup)

    'Adds buttons to the popup command bar
    With Popup

        'Adds the "Show More Buttons" button
        Set Control = frmMain.AddButton(.Controls, xtpControlButton, SHORTCUT_SHOW_MORE, "Show &More Buttons")
        'Enable this button if all buttons are not expanded
        Control.Enabled = (wndShortcutBar.ExpandedLinesCount <> 9)

        'Adds the "Show Fewer Buttons" button
        Set Control = frmMain.AddButton(.Controls, xtpControlButton, SHORTCUT_SHOW_FEWER, "Show &Fewer Buttons")
        'Enable this button if there are 1 or more buttons expanded
        Control.Enabled = (wndShortcutBar.ExpandedLinesCount <> 1)
       
        frmMain.AddButton .Controls, xtpControlButton, SHORTCUT_NAVIGATE_PANE_OPTIONS, "Na&vigation Pane Options..."
        Set Control = frmMain.AddButton(.Controls, xtpControlButtonPopup, SHORTCUT_ADD_REMOVE_BUTTONS, "&Add or Remove Buttons")

        For Each Item In wndShortcutBar
         &nbs p;  If Not Item.Id = -1 Then
         &nbs p;      With Control.CommandBar
         &nbs p;          Set SubControl = frmMain.AddButton(.Controls, xtpControlButton, Item.Id + iOffset, Item.Caption)
         &nbs p;          SubControl.IconId = Item.Id
         &nbs p;          SubControl.Checked = Item.Visible
         &nbs p;      End With
         &nbs p;  End If
        Next
       
        Dim BeginGroup As Boolean
        BeginGroup = True
       
        'Adds all hidden shortcut bar buttons to the popup menu
        For Each Item In wndShortcutBar
         &nbs p;  'If shortcut bar item is hidden, then addit to the popup menu
         &nbs p;  If (Item.Hidden) Then
         &nbs p;      frmMain.AddButton .Controls, xtpControlButton, Item.Id, Item.Caption, BeginGroup
         &nbs p;      BeginGroup = False
         &nbs p;  End If
        Next

    End With

    'Stores the ID of the selected control prom the expand button popup menu.
    Dim nCommand As Long

    'Displays the expand button popup.
    'Passing TPM_RETURNCMD into ShowPopup will cause the ID of the control to be returned
    'when a control in the popup is clicked. When using the TPM_RETURNCMD parameter, the
    'CommandBars_Execute event does not fire because the ID of the control is returned instead.
    nCommand = Popup.ShowPopup(TPM_RETURNCMD)

    'Popup is closed and the user did not select anything, they might have click on something
    'other than the popup menu
    If (nCommand = 0) Then Exit Sub


    'A control was selected from the popup menu. Determines which control was selected.
    Select Case (nCommand)
        Case SHORTCUT_INBOX + iOffset To SHORTCUT_JOURNAL + iOffset
         &nbs p;  wndShortcutBar.FindItem(nCommand - iOffset).Visible = Not wndShortcutBar.FindItem(nCommand - iOffset).Visible
         &nbs p; 
        Case SHORTCUT_SHOW_MORE:
         &nbs p;  wndShortcutBar.ExpandedLinesCount = wndShortcutBar.ExpandedLinesCount + 1
       
        Case SHORTCUT_SHOW_FEWER:
         &nbs p;  wndShortcutBar.ExpandedLinesCount = wndShortcutBar.ExpandedLinesCount - 1
         &nbs p; 
        Case SHORTCUT_NAVIGATE_PANE_OPTIONS:
         &nbs p;  Debug.Print "Navigate Pane Options Clicked"
         &nbs p; 
        Case Else:
         &nbs p;  'Selects the selected shortcut bar item.
         &nbs p;  wndShortcutBar.Selected = wndShortcutBar.FindItem(nCommand)
    End Select

End Sub


Let me know if oyu have trouble using this code
Back to Top
finn View Drop Down
Groupie
Groupie
Avatar

Joined: 11 February 2005
Location: Germany
Status: Offline
Points: 60
Post Options Post Options   Thanks (0) Thanks(0)   Quote finn Quote  Post ReplyReply Direct Link To This Post Posted: 12 February 2005 at 8:47am

There is one problem. In the line, where is the following text I get an error message:

'Adds the "Show More Buttons" button
Set Control = frmMain.AddButton(.Controls, xtpControlButton, SHORTCUT_SHOW_MORE, "Show &More Buttons")

The error message is this:

"Compile Error: Method or data member not found"

Maybe you can help me!

Back to Top
SuperMario View Drop Down
Admin Group
Admin Group
Avatar

Joined: 14 February 2004
Status: Offline
Points: 18057
Post Options Post Options   Thanks (0) Thanks(0)   Quote SuperMario Quote  Post ReplyReply Direct Link To This Post Posted: 12 February 2005 at 12:47pm
Opps, i used a helper funtion to add the controls to the popup


Private Function AddButton(Controls As CommandBarControls, ControlType As XTPControlType, Id As Long, Caption As String, Optional BeginGroup As Boolean = False, Optional DescriptionText As String = "", Optional ButtonStyle As XTPButtonStyle = xtpButtonAutomatic, Optional Category As String = "Controls") As CommandBarControl
    Dim Control As CommandBarControl
    Set Control = Controls.Add(ControlType, Id, Caption)
   
    Control.BeginGroup = BeginGroup
    Control.DescriptionText = DescriptionText
    Control.Style = ButtonStyle
    Control.Category = Category
   
    Set AddButton = Control
   
End Function


Let me know if you need more help
Back to Top
finn View Drop Down
Groupie
Groupie
Avatar

Joined: 11 February 2005
Location: Germany
Status: Offline
Points: 60
Post Options Post Options   Thanks (0) Thanks(0)   Quote finn Quote  Post ReplyReply Direct Link To This Post Posted: 12 February 2005 at 1:00pm
I don't know why, but now I get the error message "Ambiguous name detected: wndShortcutBar_ExpandButtonDown". Like I said, I don't know why!
Back to Top
finn View Drop Down
Groupie
Groupie
Avatar

Joined: 11 February 2005
Location: Germany
Status: Offline
Points: 60
Post Options Post Options   Thanks (0) Thanks(0)   Quote finn Quote  Post ReplyReply Direct Link To This Post Posted: 12 February 2005 at 1:04pm

Sorry! That was my misstake!

Back to Top
SuperMario View Drop Down
Admin Group
Admin Group
Avatar

Joined: 14 February 2004
Status: Offline
Points: 18057
Post Options Post Options   Thanks (0) Thanks(0)   Quote SuperMario Quote  Post ReplyReply Direct Link To This Post Posted: 12 February 2005 at 9:42pm
So did you get it to work?
Back to Top
finn View Drop Down
Groupie
Groupie
Avatar

Joined: 11 February 2005
Location: Germany
Status: Offline
Points: 60
Post Options Post Options   Thanks (0) Thanks(0)   Quote finn Quote  Post ReplyReply Direct Link To This Post Posted: 13 February 2005 at 5:30am

Yes! It works very well! One Question I still have (it's no problem):

How can I get the icons from the ShortcutBar in the menu, so that you can see the icons before the entry. And in Microsoft Office Outlook 2003 there are icons for the entries "Show more buttons" and "Show fewer buttons".

Maybe you can answer my question!

Back to Top
SuperMario View Drop Down
Admin Group
Admin Group
Avatar

Joined: 14 February 2004
Status: Offline
Points: 18057
Post Options Post Options   Thanks (0) Thanks(0)   Quote SuperMario Quote  Post ReplyReply Direct Link To This Post Posted: 13 February 2005 at 8:18pm
Yes, wait until next release (Should be this week) and see the Outlook 2003 sample.  All images are included.  I took out that code because it is using some new featuers not yet available in the current release.
Back to Top
gshawn View Drop Down
Senior Member
Senior Member


Joined: 04 October 2004
Status: Offline
Points: 227
Post Options Post Options   Thanks (0) Thanks(0)   Quote gshawn Quote  Post ReplyReply Direct Link To This Post Posted: 14 February 2005 at 6:54am
Originally posted by SuperMario SuperMario wrote:

Yes, wait until next release (Should be this week)
So it's safe to assume we're not getting a Valentine's Day present from CodeJock today?
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.188 seconds.