Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Sample config to enable language switcher
const Configurations = {
/* Refer devportal/source/src/defaultTheme.js */
custom: {
languageSwitch: {
active: true,
languages: [
{
key: 'en',
image: '/site/public/images/flags/en.png',
imageWidth: 24, // in pixles
text: 'English',
direction: 'ltr',
},
{
key: 'es',
image: '/site/public/images/flags/sp.png',
imageWidth: 24, // in pixles
text: 'Spanish',
direction: 'ltr',
},
{
key: 'ar',
image: '/site/public/images/flags/ar.png',
imageWidth: 24, // in pixles
text: 'Arabic',
direction: 'rtl',
},
{
key: 'si',
image: '/site/public/images/flags/si.png',
imageWidth: 24, // in pixles
text: 'Sinhala',
direction: 'ltr',
}
],
showFlag: true,
showText: true,
minWidth: 60, // Width of the language switcher in pixles
}
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.