This service is used to get and prepare messages to be logged or retrieved to a final user. The messages that will be used are defined in the object CORE_MESSAGES and the default language is English(en)
You can check the guide The Way Internationalization to see how to use the internationalization in TheWay Framework
- Property: static messages
- Property: static language
- Method: static setLanguage
- Method: static getCodeMessage
- Method: static getMessage
Is a local reference to CORE_MESSAGES
Is the language that will be used to find the message in CORE_MESSAGES. The default value is 'en'
This method will set the language that will be used to find the message in CORE_MESSAGES if the language is not found in the CORE_MESSAGES object, will be used the default language to find the message
- language: Is the language
This method can be used to retrieve a message that is a number
- name: The message in the CoreMessage
- The message number
This method retrieves a message. Also, this method replaces every $ in the message with a provided value. If the current language does not have the message, the method will try to get the message using the default language (en)
- name: The message in the CoreMessage
- replacements: This array of string will be used to replace every $ in the message with a value in the array. The replacements will use the array order
- The handled message