Talk:Common Class/Notes: Difference between revisions

From ReliaWiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 2: Line 2:


'''To Do:'''
'''To Do:'''
*Move this page to a new name: CLanguage Class
*Move this page to a new name: CLanguage.SetLanguage
:Reason for move: Moved page to consolidate information and improve docs, as per SYN-I-4864.
:Reason for move: Moved page to consolidate information and improve docs, as per SYN-I-4864.



Revision as of 21:12, 13 January 2016


To Do:

  • Move this page to a new name: CLanguage.SetLanguage
Reason for move: Moved page to consolidate information and improve docs, as per SYN-I-4864.
  • Then copy the contents below to the new page.





Sets the language of the Synthesis API library. Messages returned by the Synthesis repository to the API will be displayed in the specified language.

Syntax

.SetLanguage(Language)  

Parameters

Language

Required. The display language. Can be any Language constant.


Example

To demonstrate the method's functionality, the example deliberately returns an error message in Portuguese by connecting to a repository that doesn't exist.

 VBA

 'Set the API's language to Portuguese 
  Dim Lng As New cLanguage
  Lng.SetLanguage (Language_Portuguese)

 'The following code will deliberately cause the connection to fail and return an error message. 
  Dim MyRepository As New Repository
  MyRepository.ConnectToAccessRepository("C:\RSRepositoryx122g3.rsr10")
 VB.NET

 'Set the API's language to Portuguese 
  Dim Lng As New cLanguage
  Lng.SetLanguage (Language.Portuguese)

 'The following code will deliberately cause the connection to fail and return an error message. 
  Dim MyRepository As New Repository
  MyRepository.ConnectToAccessRepository("C:\RSRepositoryx122g3.rsr10")