Posted 11 years ago by Andreas
Version: 4.0.0284
Is there any way to affect the language of the syntax errors reported by the compilation unit? The compiler seems to always use English culture settings, but I would like to have the error texts in the language of the current user interface culture. Is this possible?

Thanks in advance.


Comments (2)

Posted 11 years ago by Actipro Software Support - Cleveland, OH, USA
Hi Andreas,

We do use string resources for those, that can be customized by using lines like this at your app startup:
   "SemanticParserError_AliasExpected ", "your text");
Here is the list of the available string resources and their values:
SemanticParserError_AliasExpected = 'alias' expected.
SemanticParserError_ImportsBeforeDeclarations = 'Imports' statements must precede any declarations.
SemanticParserError_OptionFollowedBy = 'Option' must be followed by 'Explicit', 'Compare', 'Strict', or 'Infer'.
SemanticParserError_OptionBeforeDeclarations = 'Option' statements must precede any declarations or 'Imports' statements.
SemanticParserError_OptionCompareSyntax = 'Option Compare' must be followed by 'Binary' or 'Text'.
SemanticParserError_OptionExplicitSyntax = 'Option Explicit' must be followed by 'On' or 'Off'.
SemanticParserError_OptionInferSyntax = 'Option Infer' must be followed by 'On' or 'Off'.
SemanticParserError_OptionStrictSyntax = 'Option Strict' must be followed by 'On' or 'Off'.
SemanticParserError_ImplicitlyTypedVariableDeclarationNullInitializer = A null type is not permitted as the initializer for an implicitly typed variable declaration.
SemanticParserError_UsingBeforeNamespace = A using clause must precede all other namespace elements except extern alias declarations.
SemanticParserError_AnonymousTypeMemberDeclaratorSyntax = An anonymous type member declarator must be a simple name, member access, or property assignment.
SemanticParserError_AnonymousTypeMemberDeclaratorAssignment = An anonymous type member declarator that performs a property assignment must specify a simple name on the left side.
SemanticParserError_ImplicitlyTypedArrayNullInitializer = An implicitly typed array requires that a non-null type be included in its initializer.
SemanticParserError_ImplicitlyTypedVariableDeclarationNoInitializer = An initializer must be specified in implicitly typed variable declarations.
SemanticParserError_ExternalAliasBeforeNamespace = An external alias clause must precede all other namespace elements.
SemanticParserError_ArgumentExpected = Argument expected.
SemanticParserError_ClassMemberDeclarationExpected = Class member declaration expected.
SemanticParserError_EnumerationMemberDeclarationExpected = Enumeration member declaration expected.
SemanticParserError_ExpressionExpected = Expression expected.
SemanticParserError_ExtensionMethodsInStaticClass = Extension methods can only be declared in a static class.
SemanticParserError_ExtensionMethodsRequireOneParameter = Extension methods require at least one parameter.
SemanticParserError_InterfaceMemberDeclarationExpected = Interface member declaration expected.
SemanticParserError_NamespaceMemberDeclarationExpected = Namespace member declaration expected.
SemanticParserError_ModuleMemberDeclarationExpected = Module member declaration expected.
SemanticParserError_StatementExpected = Statement expected.
SemanticParserError_StructureMemberDeclarationExpected = Structure member declaration expected.
SemanticParserError_SwitchSectionExpected = Switch section expected.
SemanticParserError_WhereExpected = where expected.

Actipro Software Support

Posted 11 years ago by Andreas
Thank you very much. That helps a lot.

The latest build of this product (v2020.1 build 0403) was released 2 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.