Language fields
When supporting a new language on your application, you will need to use the Locale
type. It allows you to define translations for various text elements, making your app accessible to a global audience.
Type Definition
The Locale
has two main properties, the language
and its messages
. Here is how it’s built:
{
language: "da",
messages: {
username: "brugernavn",
loading: "indlæser...",
// Add more messages as needed
}
}
Check out the description of each field:
Name | Type | Description |
---|---|---|
language | string | Required. Represents the language you are adding to the application. It should adhere to the ISO 639-1 standard. Example values include en for English and es for Spanish. |
messages | - | Required. An object that describes user messages and their translations. |
Each locale should include the language name and its corresponding messages. Here's an example:
The complete list of fields for each component can be found in the documentation.
Messages
Here, you'll find the existing messages presented as key-value pairs. It's important to keep the keys and make updates only to the associated values.
{
"participantName": "name",
"loading": "Loading...",
"next": "Next",
"meeting": {
"screenshare": "ScreenShare",
"spectators": "{count} Spectator | {count} Spectators",
"tabsMeeting": {
"host": "Host",
"giveControl": "Give Control",
"takeControl": "Take Control",
"gatherAll": "Gather All",
"goTo": "Go to",
"follow": "Follow",
"unfollow": "Unfollow",
"followed": "Followed",
"kick": "Kick",
"muteLabel": "Mute"
}
},
"toolbar": {
"chat": "Chat",
"settings": "Meeting setup",
"recording": "Record meeting"
},
"meetingSettings": {
"title": "Meeting settings",
"description": "Set your mic and cam to start",
"descriptionWithoutCam": "Set your mic to start",
"join": "Join",
"waitingHost": "Waiting for host",
"avatarDescription": "Choose your avatar",
"notCurrentlyAvailable": "The meeting service is not currently available. Please contact the developer for assistance."
},
"broadcastSettings": {
"title": "Broadcast settings",
"description": "Set your name and join the broadcast"
},
"deviceSettings": {
"turnOff": "turn off",
"camOff": "Camera off",
"camBlocked": "To use your camera, please allow the necessary access.",
"micBlocked": "Please, allow the microphone to be used to start the meeting.",
"camOrMicBlocked": "Please, allow the camera and microphone to be used to start the meeting.",
"deviceInitializationError": "Unable to connect to your webcam or microphone. Please make sure that you are not using your webcam or microphone in another application.",
"unknownError": "Oops. An unrecognized error has occurred. Please try and reload the page. If the error continues please contact us.",
"initializingSession": "Initializing session, please stand by.",
"videoInputBlockedPerformance": "Your webcam and remote attendees video was disabled due to performance issues.",
"withoutDevices": "You don't have a device connected but you'll be able to see and listen to other attendees.",
"withoutCam": "You don't have a webcam connected",
"noVideoSlotsAvailable": "Current meeting does not have video slots available"
},
"meetingDeviceSettings": {
"title": "Settings",
"setup": "Setup",
"ok": "Ok"
},
"meetingHangUp": {
"hangUp": "Hang up",
"title": "Leave Meeting",
"subtitle": "Are you sure you want to leave the meeting?",
"cancel": "cancel",
"leave": "leave"
},
"meetingChat": {
"title": "Chat",
"placeholder": "Type a message",
"audience": "Audience"
},
"recording": {
"start": {
"title": "Meeting Recording",
"text": "Your meeting will now be recorded",
"selectTitle": "Language",
"buttonConfirm": "OK"
},
"stop": {
"title": "Stop Recording",
"text": "Are you sure you want to stop recording the meeting?",
"buttonCancel": "Cancel",
"buttonConfirm": "Stop"
},
"alert": {
"title": "Meeting Recording",
"text": "Your meeting is being recorded",
"buttonConfirm": "Ok"
}
},
"devicesBlocksModal": {
"title": "No access to devices",
"description": "The meeting is blocked from using your camera and microphone",
"chromeDesktop": {
"firstStep": {
"preImage": "1. Click the",
"postImage": "icon in your browser's address bar and allow access."
},
"secondStep": "2. Reload this page when you've allowed access."
},
"chromeAndroid": {
"firstStep": {
"preImage": "1. Click the",
"postImage": "icon in your browser's address bar and allow access."
},
"secondStep": "2. Reload this page when you've allowed access."
},
"chromeIos": {
"firstStep": "1. Go to your phone's Settings > Choose 'Chrome' > Allow Chrome to access Microphone and Camera.",
"secondStep": "2. Reload this page when you've allowed access."
},
"safariDesktop": {
"firstStep": "1. In the menu choose 'Safari' > 'Settings for This Website. > Choose 'Allow' for Camera and Microphone.",
"secondStep": "2. Reload this page when you've allowed access."
},
"safariMobile": {
"firstStep": "1. Go to your phone's Settings > Choose 'Safari' > 'Microphone & Camera' > and then choose 'Ask'.",
"secondStep": "2. Reload this page when you've allowed access."
},
"firefox": {
"firstStep": "1. Click the devices icons in your browser's address bar and allow access.",
"secondStep": "2. Reload this page when you've allowed access."
}
}
}
Placeholders
In certain messages, it uses placeholders to dynamically insert values. For instance, in the spectators
translation, {count}
is a placeholder that can be replaced with an actual number. To ensure proper functionality, it's essential not to alter the text within the curly braces.