Jump to: navigation, search
(Update with the copy of version: draft)
(Update with the copy of version: draft)
Line 3: Line 3:
 
{{NoteFormat|For information on how to setup localization, please refer to the  [[GWCInternat|Localization Guide]]|1}}
 
{{NoteFormat|For information on how to setup localization, please refer to the  [[GWCInternat|Localization Guide]]|1}}
  
==Strings==
+
==Usage==
 +
'callback' namespace should be used when defining localization strings for Callback plugin in your i18n JSON file.
  
<source lang='javascript'>
+
In the example below, we demonstrate defining new strings for the 'en' (English) language. You may use any language codes you wish; there is no standard format. When selecting the active language in your configuration, you must match one of the language codes defined in your i18n JSON file. Please note that you must only define a language code once in your i18n JSON file. Inside each language object you should define new strings for each widget.
{
+
 
"CallbackTitle": "Receive a Call",
+
==Example i18n JSON==
"CallbackTitleDescription": "Please fill out the following details.",
+
<source lang='javascript'>{
"CancelButtonText": "Cancel",
+
"en": {
"ConfirmButtonText": "Confirm",
+
"callback": {
"CallbackFirstName": "First Name",
+
"CallbackTitle": "Receive a Call",
"CallbackPlaceholderFirstName": "Required",
+
"CallbackTitleDescription": "Please fill out the following details.",
"CallbackLastName": "Last Name",
+
"CancelButtonText": "Cancel",
"CallbackPlaceholderLastName": "Required",
+
"ConfirmButtonText": "Confirm",
"CallbackPhoneNumber": "Phone",
+
"CallbackFirstName": "First Name",
"CallbackPlaceholderPhoneNumber": "Required",
+
"CallbackPlaceholderFirstName": "Required",
"CallbackEmail": "Email",
+
"CallbackLastName": "Last Name",
"CallbackPlaceholderEmail": "Optional",
+
"CallbackPlaceholderLastName": "Required",
"CallbackPlaceholderNotes": "Optional",
+
"CallbackPhoneNumber": "Phone",
"CallbackDateTime": "Date & Time",
+
"CallbackPlaceholderPhoneNumber": "Required",
"CallbackDateTimeDescription": "When should we call you? (Required)",
+
"CallbackEmail": "Email",
"CallbackTodayDate": "Today",
+
"CallbackPlaceholderEmail": "Optional",
"CallbackDayLabels": ["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],
+
"CallbackPlaceholderNotes": "Optional",
"CallbackMonthLabels": ["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],
+
"CallbackDateTime": "Date & Time",
"CallbackTimeAtText": "at",
+
"CallbackDateTimeDescription": "When should we call you? (Required)",
"CallbackRadioButtonText": "As Soon As Possible",
+
"CallbackTodayDate": "Today",
"CallbackBookedPhoneNumberLabel": "Phone",
+
"CallbackDayLabels": [
"CallbackBookedDateTimeLabel": "Date & Time",
+
"Sunday",
"CallbackBookedNotesLabel": "Optional Notes",
+
"Monday",
"CallbackBookedDescription": "You're booked in!",
+
"Tuesday",
"CallbackNotes": "Notes",
+
"Wednesday",
"CallbackDone": "Done",
+
"Thursday",
"CallbackOk": "Okay",
+
"Friday",
"CallbackCloseConfirm": "Are you sure you want to cancel arranging this callback?",
+
"Saturday"
"CallbackNoButtonText": "No",
+
],
"CallbackYesButtonText": "Yes",
+
"CallbackMonthLabels": [
"CallbackPlaceholderCalendar": "Custom Date & Time",
+
"Jan",
"Errors": {
+
"Feb",
"unknownError": "Something went wrong, we apologize for the inconvenience. Please check your connection settings and try again."
+
"Mar",
 +
"Apr",
 +
"May",
 +
"Jun",
 +
"Jul",
 +
"Aug",
 +
"Sep",
 +
"Oct",
 +
"Nov",
 +
"Dec"
 +
],
 +
"CallbackTimeAtText": "at",
 +
"CallbackRadioButtonText": "As Soon As Possible",
 +
"CallbackBookedPhoneNumberLabel": "Phone",
 +
"CallbackBookedDateTimeLabel": "Date & Time",
 +
"CallbackBookedNotesLabel": "Optional Notes",
 +
"CallbackBookedDescription": "You're booked in!",
 +
"CallbackNotes": "Notes",
 +
"CallbackDone": "Done",
 +
"CallbackOk": "Okay",
 +
"CallbackCloseConfirm": "Are you sure you want to cancel arranging this callback?",
 +
"CallbackNoButtonText": "No",
 +
"CallbackYesButtonText": "Yes",
 +
"CallbackPlaceholderCalendar": "Custom Date & Time",
 +
"Errors": {
 +
"unknownError": "Something went wrong, we apologize for the inconvenience. Please check your connection settings and try again."
 +
}
 +
}
 
}
 
}
}
+
}</source>
</source>
 
  
 
[[Category:V:PSAAS:Public]]
 
[[Category:V:PSAAS:Public]]

Revision as of 17:19, November 15, 2017

Localization

Important
For information on how to setup localization, please refer to the Localization Guide

Usage

'callback' namespace should be used when defining localization strings for Callback plugin in your i18n JSON file.

In the example below, we demonstrate defining new strings for the 'en' (English) language. You may use any language codes you wish; there is no standard format. When selecting the active language in your configuration, you must match one of the language codes defined in your i18n JSON file. Please note that you must only define a language code once in your i18n JSON file. Inside each language object you should define new strings for each widget.

Example i18n JSON

{
	"en": {
		"callback": {
			"CallbackTitle": "Receive a Call",
			"CallbackTitleDescription": "Please fill out the following details.",
			"CancelButtonText": "Cancel",
			"ConfirmButtonText": "Confirm",
			"CallbackFirstName": "First Name",
			"CallbackPlaceholderFirstName": "Required",
			"CallbackLastName": "Last Name",
			"CallbackPlaceholderLastName": "Required",
			"CallbackPhoneNumber": "Phone",
			"CallbackPlaceholderPhoneNumber": "Required",
			"CallbackEmail": "Email",
			"CallbackPlaceholderEmail": "Optional",
			"CallbackPlaceholderNotes": "Optional",
			"CallbackDateTime": "Date & Time",
			"CallbackDateTimeDescription": "When should we call you? (Required)",
			"CallbackTodayDate": "Today",
			"CallbackDayLabels": [
				"Sunday",
				"Monday",
				"Tuesday",
				"Wednesday",
				"Thursday",
				"Friday",
				"Saturday"
			],
			"CallbackMonthLabels": [
				"Jan",
				"Feb",
				"Mar",
				"Apr",
				"May",
				"Jun",
				"Jul",
				"Aug",
				"Sep",
				"Oct",
				"Nov",
				"Dec"
			],
			"CallbackTimeAtText": "at",
			"CallbackRadioButtonText": "As Soon As Possible",
			"CallbackBookedPhoneNumberLabel": "Phone",
			"CallbackBookedDateTimeLabel": "Date & Time",
			"CallbackBookedNotesLabel": "Optional Notes",
			"CallbackBookedDescription": "You're booked in!",
			"CallbackNotes": "Notes",
			"CallbackDone": "Done",
			"CallbackOk": "Okay",
			"CallbackCloseConfirm": "Are you sure you want to cancel arranging this callback?",
			"CallbackNoButtonText": "No",
			"CallbackYesButtonText": "Yes",
			"CallbackPlaceholderCalendar": "Custom Date & Time",
			"Errors": {
				"unknownError": "Something went wrong, we apologize for the inconvenience. Please check your connection settings and try again."
			}
		}
	}
}
Comments or questions about this documentation? Contact us for support!