Internationalization support in yFiles WPF (version 2.5)

Tips & Tricks

Summary

Overview on the internationalization (i18n) and the localization (l10n) support in yFiles WPF.

This article was written for an older version. It is only online as a reference for customers using this old version. The information it contains is probably out of date.

The latest information can be found in the yFiles documentation

Description

There are basically two parts to i18n support and l10n in an application that uses one of the diagramming libraries of the yFiles product family:

  • the graph representation itself: this includes the visual representation of node labels and edge labels, but also their representation when saving a graph to a graph exchange file format like GraphML
  • the user interface (UI) of an application: this includes text of UI elements like buttons, etc.

Graph representation

I18n support for displaying the label depends on the actual label style used, as well as on the availability of suitable fonts that contain the correct glyphs for a specific language. The default implementations for the ILabelStyle interface support arbitrary fonts as well as all text orientations that exist for the .NET framework. Saving and loading localized diagrams with GraphML is also fully supported. For interactive label editing, a standard WPF TextBox implementation is used by default, which can be customized with standard .NET framework methods.

User interface

yFiles WPF uses commands for a lot of actions within the library, which can be bound to toolbar buttons, or menu items. The text shown for those commands as well as the default input bindings for invoking them via the keyboard can be changed by including custom resources named either yWorks.Canvas.CanvasResources or yWorks.yFiles.GraphResources to override the defaults.

The default strings and shortcuts are as follows:

yWorks.Canvas.CanvasResources:

NameValue
CopyCopy
CopyKeyCtrl+C
CutCut
CutKeyCtrl+X
DecreaseZoomZoom Out
DeleteDelete
DeleteKeyDelete
ExtendSelectionDownExtend Selection Down
ExtendSelectionDownKeyShift+Down
ExtendSelectionLeftExtend Selection Left
ExtendSelectionLeftKeyShift+Left
ExtendSelectionRightExtend Selection Right
ExtendSelectionRightKeyShift+Right
ExtendSelectionUpExtend Selection Up
ExtendSelectionUpKeyShift+Up
FitContentFit Content
IncreaseZoomZoom In
MoveDownMove Down
MoveDownKeyDown
MoveFocusBackMove Focus Backward
MoveFocusBackKeyCtrl+Left
MoveFocusDownMove Focus Down
MoveFocusDownKeyCtrl+Down
MoveFocusForwardMove Focus Forward
MoveFocusForwardKeyCtrl+Right
MoveFocusUpMove Focus Up
MoveFocusUpKeyCtrl+Up
MoveLeftMove Left
MoveLeftKeyLeft
MoveRightMove Right
MoveRightKeyRight
MoveToPageDownMove Page Down
MoveToPageDownKeyPageDown
MoveToPageUpMove Page Up
MoveToPageUpKeyPageUp
MoveUpMove Up
MoveUpKeyUp
NewNew
NewKeyCtrl+N
OpenOpen
PastePaste
PasteKeyCtrl+V
PixelImageExporter.OutOfMemoryNot enough memory for temporary image.
PrintPrint
PrintJob.DescriptionCanvas Contents
PrintKeyCtrl+P
PrintPreviewPrintPreview
PrintPreview.DocumentViewer.Window.TitlePrint Preview
PrintPreviewKeyCtrl+F2
RedoRedo
RedoKeyCtrl+Y
SaveSave
SaveAsSave As...
ScrollPageDownScroll Page Down
ScrollPageDownKeyPageDown
ScrollPageLeftScroll Page Left
ScrollPageRightScroll Page Right
ScrollPageUpScroll Page Up
ScrollPageUpKeyPageUp
SelectAllSelect All
SelectAllKeyCtrl+A
UnavailableUnavailable
UndoUndo
UndoKeyCtrl+Z
UpdateContentRectUpdate Content Rectangle
ZoomZoom

yWorks.yFiles.GraphResources:

NameValue
AddBend.RedoNameAdd Bend
AddBend.UndoNameRemove Bend
AddLabelAdd Label
AddLabel.RedoNameAdd Label
AddLabel.UndoNameRemove Label
AddLabelKeyShift+F2
AddPort.RedoNameAdd Port
AddPort.UndoNameRemove Port
AdjustGroupNodeSizeAdjust Group Node Size
AdjustGroupNodeSize.RedoNameAdjust Group Node Size
AdjustGroupNodeSize.UndoNameAdjust Group Node Size
AdjustGroupNodeSizeKeyCtrl+Shift+G
AdjustToSizeConstraints.RedoNameAdjust Node Size
AdjustToSizeConstraints.UndoNameAdjust Node Size
BeginEdgeCreationCreate Edge
CollapseGroupCollapse Group
CollapseGroupKeyCtrl+Subtract;Ctrl+OemMinus
CollapseNode.RedoNameCollapse Node
CollapseNode.UndoNameExpand Node
CreateEdge.RedoNameAdd Edge
CreateEdge.UndoNameRemove Edge
CreateNode.RedoNameAdd Node
CreateNode.UndoNameRemove Node
CreateStripe.RedoNameCreateStripe
CreateStripe.UndoNameAdd Stripe
Cut.RedoNameRedo Cut
Cut.UndoNameUndo Cut
DeleteSelection.RedoNameRedo Delete
DeleteSelection.UndoNameUndo Delete
DeselectAllDeselect All
DeselectAllKeyCtrl+Shift+A
DeselectItemDeselect Item
DuplicateDuplicate
Duplicate.RedoNameRedo Duplicate
Duplicate.UndoNameUndo Duplicate
DuplicateKeyCtrl+D
EditLabelEdit Label
EditLabelKeyF2
EnterGroupEnter Group
EnterGroupKeyCtrl+Enter
ExitGroupExit Group
ExitGroupKeyCtrl+Backspace
ExpandGroupExpand Group
ExpandGroupKeyCtrl+Add;Ctrl+Oemplus
ExpandNode.RedoNameExpand Node
ExpandNode.UndoNameCollapse Node
FitGraphBoundsFit Graph Bounds
GraphControl.OpenFileDialog.DefaultExtgraphml
GraphControl.OpenFileDialog.FilterGraphML Files|.graphml|XML Files|.xml|All files|.
GraphControl.OpenFileDialog.TitleOpen Diagram...
GraphControl.SaveFileDialog.DefaultExtgraphml
GraphControl.SaveFileDialog.FilterGraphML Files|.graphml|XML Files|.xml|All files|.
GraphControl.SaveFileDialog.TitleSave Diagram...
GroupSelectionGroup Selection
GroupSelectionKeyCtrl+G
Move.RedoNameMove Items
Move.UndoNameMove Items
MoveHandle.RedoNameMove Handle
MoveHandle.UndoNameMove Handle
NodeDropInputMode.NodeDropped.RedoNameAdd Node
NodeDropInputMode.NodeDropped.UndoNameRemove Node
OpenFileFailed.CaptionError Loading File
OpenFileFailed.MessageThere was a problem during the loading of the file.
Paste.RedoNameRedo Paste
Paste.UndoNameUndo Paste
RemoveBend.RedoNameRemove Bend
RemoveBend.UndoNameAdd Bend
RemoveEdge.RedoNameRemove Edge
RemoveEdge.UndoNameAdd Edge
RemoveLabel.RedoNameRemove Label
RemoveLabel.UndoNameAdd Label
RemoveNode.RedoNameRemove Node
RemoveNode.UndoNameAdd Node
RemovePort.RedoNameRemove Port
RemovePort.UndoNameAdd Port
RemoveStripe.RedoNameAdd Stripe
RemoveStripe.UndoNameRemove Stripe
ReparentStripe.RedoNameReparent Stripe
ReparentStripe.UndoNameReparent Stripe
ResizeNode.RedoNameResize Node
ResizeNode.UndoNameResize Node
ReverseEdgeReverse Edge
ReverseEdge.RedoNameReverse Edge
ReverseEdge.UndoNameReverse Edge
ReverseEdgeKeyCtrl+R
SaveFileFailed.CaptionError Saving File
SaveFileFailed.MessageThere was a problem during the saving of the file.
SelectItemSelect Item
SetCurrentItemSet Current Item
SetEdgeStyle.RedoNameChange Edge Style
SetEdgeStyle.UndoNameChange Edge Style
SetLabelModelParameter.RedoNameChange Label Position
SetLabelModelParameter.UndoNameChange Label Position
SetLabelStyle.RedoNameChange Label Style
SetLabelStyle.UndoNameChange Label Style
SetLabelText.RedoNameChange Label Text
SetLabelText.UndoNameChange Label Text
SetLeaf.RedoNameConvert Back to Group Node
SetLeaf.UndoNameConvert to Normal Node
SetLocationModelParameter.RedoNameChange Port Location
SetLocationModelParameter.UndoNameChange Port Location
SetNodeStyle.RedoNameChange Node Style
SetNodeStyle.UndoNameChange Node Style
SetNonLeaf.RedoNameConvert Back to Normal Node
SetNonLeaf.UndoNameConvert to Group Node
SetParent.RedoNameChange Parent
SetParent.UndoNameChange Parent
SetPorts.RedoNameReconnect Edge
SetPorts.UndoNameReconnect Edge
SetPortStyle.RedoNameChange Port Style
SetPortStyle.UndoNameChange Port Style
SetPreferredLabelSize.RedoNameChange Preferred Label Size
SetPreferredLabelSize.UndoNameChange Preferred Label Size
SetStripeInsets.RedoNameChange Stripe Insets
SetStripeInsets.UndoNameChange Stripe Insets
SetStripeMinimumSize.RedoNameChange Minimum Stripe Size
SetStripeMinimumSize.UndoNameChange Minimum Stripe Size
SetStripeSize.RedoNameChange Stripe Size
SetStripeSize.UndoNameChange Stripe Size
SetStripeStyle.RedoNameChange Stripe Style
SetStripeStyle.UndoNameChange Stripe Style
ToggleGroupStateToggle Group State
ToggleGroupStateKeyCtrl+Multiply
ToggleItemSelectionToggle Selection
ToggleItemSelectionKeyCtrl+Space
UnavailableUnavailable
UngroupSelectionUngroup Selection
UngroupSelectionKeyCtrl+U
ZoomToCurrentItemZoom To Current Item

Categories this article belongs to:
yFiles WPF > Other
Applies to:
yFiles WPF: 2.5
Keywords:
internationalization - i18n - localization - l10n - resource - bundle - localized - GraphML