Localizing SyntaxEditor UI Strings

SyntaxEditor for Windows Forms Forum

Posted 16 years ago by Actipro Software Support - Cleveland, OH, USA
Version: 4.0.0274
Avatar
All the UI strings used in SyntaxEditor can be customized via code like this:
ActiproSoftware.Products.SyntaxEditor.AssemblyInfo.Instance.Resources.SetCustomString(
   "DocumentModificationType_AutoComplete", "Localized Auto-complete Text");
Here is a list of all the string keys that can be localized as of build 274:
General_CancelButton_Text = Cancel
General_CloseButton_Text = Close
General_OkButton_Text = OK

CodeSnippet_InsertSnippetPopup_ShortcutLabel = Shortcut:

DocumentModificationType_AutoComplete = Auto-complete
DocumentModificationType_AutoFormat = Auto-format
DocumentModificationType_AutoIndent = Auto-indent
DocumentModificationType_AutoReplace = Auto-replace
DocumentModificationType_Backspace = Backspace
DocumentModificationType_ChangeCase = Change case
DocumentModificationType_CommentLines = Comment lines
DocumentModificationType_ConvertSpacesToTabs = Convert spaces to tabs
DocumentModificationType_ConvertTabsToSpaces = Convert tabs to spaces
DocumentModificationType_Custom = Custom
DocumentModificationType_Cut = Cut
DocumentModificationType_Delete = Delete
DocumentModificationType_DragAndDrop = Drag/drop
DocumentModificationType_DuplicateLine = Duplicate line
DocumentModificationType_Enter = Enter
DocumentModificationType_Indent = Indent
DocumentModificationType_InsertFile = Insert file
DocumentModificationType_InsertCodeSnippetTemplate = Insert snippet template
DocumentModificationType_OpenLine = Open line
DocumentModificationType_Outdent = Outdent
DocumentModificationType_Paste = Paste
DocumentModificationType_Replace = Replace
DocumentModificationType_ReplaceAll = Replace all
DocumentModificationType_SpellingChange = Spelling change
DocumentModificationType_ToggleCase = Toggle case
DocumentModificationType_TransposeCharacters = Transpose characters
DocumentModificationType_TransposeLines = Transpose lines
DocumentModificationType_TransposeWords = Transpose words
DocumentModificationType_TrimTrailingWhitespace = Trim trailing whitespace
DocumentModificationType_Typing = Typing
DocumentModificationType_UncommentLines = Uncomment lines
DocumentModificationType_Unknown = Unknown
DocumentModificationType_UpdateCodeSnippetTemplateFields = Update template fields

FindReplaceForm_Text = Find/Replace
FindReplaceForm_FindButton_Text = &Find Next
FindReplaceForm_FindWhatLabel_Text = Fi&nd what:
FindReplaceForm_MarkAllButton_Text = &Mark All
FindReplaceForm_MarkWithCheckBox_Text = Mark with bookmarks
FindReplaceForm_MatchCaseCheckBox_Text = Match &case
FindReplaceForm_MatchWholeWordCheckBox_Text = Match &whole word
FindReplaceForm_ReplaceButton_Text = &Replace
FindReplaceForm_ReplaceAllButton_Text = Replace &All
FindReplaceForm_ReplaceWithLabel_Text = Re&place with:
FindReplaceForm_SearchHiddenTextCheckBox_Text = Search &hidden text
FindReplaceForm_SearchInSelectionCheckBox_Text = Search in selection
FindReplaceForm_SearchTypeCheckBox_Text = Us&e
FindReplaceForm_SearchTypeDropDownList_Item_RegularExpressions = Regular expressions
FindReplaceForm_SearchTypeDropDownList_Item_Wildcards = Wildcards
FindReplaceForm_SearchUpCheckBox_Text = Search &up
FindReplaceForm_Error_Message = An error occurred: 
FindReplaceForm_NotFound_Message = The specified text was not found.
FindReplaceForm_OccurrencesReplaced_Message = occurrence(s) replaced.
FindReplaceForm_PastSearchStartOffset_Message = Find reached the starting point of the search.
FindReplaceForm_RegularExpression_SingleCharacter = . Any single character
FindReplaceForm_RegularExpression_ZeroOrMore = * Zero or more
FindReplaceForm_RegularExpression_OneOrMore = + One or more
FindReplaceForm_RegularExpression_BeginningOfLine = ^ Beginning of line
FindReplaceForm_RegularExpression_EndOfLine = $ End of line
FindReplaceForm_RegularExpression_Group = ( ) Group / capture
FindReplaceForm_RegularExpression_WordBoundary = \\b Word boundary
FindReplaceForm_RegularExpression_Whitespace = \\s Whitespace
FindReplaceForm_RegularExpression_LineBreak = \\n Line break
FindReplaceForm_RegularExpression_OneCharacterInSet = [ ] Any one character in the set
FindReplaceForm_RegularExpression_OneCharacterNotInSet = [^ ] Any one character not in the set
FindReplaceForm_RegularExpression_Or = | Or
FindReplaceForm_RegularExpression_CharacterEscape = \\ Escape special character
FindReplaceForm_Wildcard_ZeroOrMore = * Zero or more of any character
FindReplaceForm_Wildcard_AnySingleCharacter = ? Any single character
FindReplaceForm_Wildcard_AnySingleDigit = # Any single digit
FindReplaceForm_Wildcard_OneCharacterInSet = [ ] Any one character in the set
FindReplaceForm_Wildcard_OneCharacterNotInSet = [! ] Any one character not in the set

GoToLineForm_Text = Go To Line
GoToLineForm_LineNumberLabel_Text = Line number (1 - {0}):
GoToLineForm_InvalidLineNumber_Message = Please enter a valid line number within the range.
GoToLineForm_InvalidNumber_Message = Please enter a valid number.

TextStatisticsForm_Text = Statistics
TextStatisticsForm_NameColumn_Text = Name
TextStatisticsForm_ValueColumn_Text = Value
TextStatisticsForm_Statistic_AverageLettersPerWord = Average Letters / Word
TextStatisticsForm_Statistic_AverageSyllablesPerWord = Average Syllables / Word
TextStatisticsForm_Statistic_AverageWordsPerSentence = Average Words / Sentence
TextStatisticsForm_Statistic_Characters = Characters
TextStatisticsForm_Statistic_CommentLineCoveragePercentage = Comment Line Coverage
TextStatisticsForm_Statistic_CommentLines = Lines (with comments)
TextStatisticsForm_Statistic_Consonants = Consonants
TextStatisticsForm_Statistic_FleschKincaidGradeLevel = Flesch-Kincaid Grade Level
TextStatisticsForm_Statistic_FleschReadingEaseScore = Flesch Reading Ease Score (0-100)
TextStatisticsForm_Statistic_Letters = Letters
TextStatisticsForm_Statistic_Lines = Lines
TextStatisticsForm_Statistic_NonWhitespaceCharacters = Characters (no spaces)
TextStatisticsForm_Statistic_NonWhitespaceLines = Lines (non-whitespace)
TextStatisticsForm_Statistic_PureCommentLines = Lines (only comments)
TextStatisticsForm_Statistic_Sentences = Sentences
TextStatisticsForm_Statistic_Syllables = Syllables
TextStatisticsForm_Statistic_Vowels = Vowels
TextStatisticsForm_Statistic_Words = Words


Actipro Software Support

Comments (6)

Posted 16 years ago by Alexey Chuikov - Project Tech Leader. Custom Development, Quest Software
Avatar
Hi team!

I don't see string key for 'Close' button text (Find/Replace dialog) among the keys above and I failed to guess it :(

Could you please give me any tip?

Thanks,
Alexey.
Posted 16 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Yes it should be the "General_CloseButton_Text" item.


Actipro Software Support

Posted 16 years ago by Alexey Chuikov - Project Tech Leader. Custom Development, Quest Software
Avatar
Hi Team!
One more question/suggestion regarding this topic.
First of all I'm glad to say that your tips helped to translate Syntax Editor's Find/Replace dialog in our product to 7 European/Asian languages (and 3 are coming soon)! But since then it became a problem to fit localized strings into given sizes of dialog's controls. For example here are three pictures demonstrating localized dialogs:

German
Italian
Russian

I suggest to slightly adjust controls in this dialog: make search/replace buttons wider, and shift combobox to the right so it will be more space for "Use".
Is it possible? What do you think?

Regards,
Alexey.
Posted 16 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Alexey,

Thanks for the screens. Just so you know, we also include the full source for the find/replace form in the sample project. You can take that and modify it however needed to support other length strings. It's the same as the dialog we use internally. We can try and improve our sizes in the future though too.


Actipro Software Support

Posted 16 years ago by Alexey Chuikov - Project Tech Leader. Custom Development, Quest Software
Avatar
OK. Thank you! Didn't notice this form in sample project. Thank you for pointing me in the right direction.

Regards,
Alexey.
Posted 11 years ago by Dieter Strang
Avatar

For those who wonder...

In newer versions the strings can be accessed via:

 

ActiproSoftware.Products.SyntaxEditor.SR
 
The latest build of this product (v24.1.0) was released 26 days ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.