Skip to content

Instantly share code, notes, and snippets.

@tmkasun
Created April 13, 2020 15:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tmkasun/e6de049a108e87570e7d9aaddb14dbe7 to your computer and use it in GitHub Desktop.
Save tmkasun/e6de049a108e87570e7d9aaddb14dbe7 to your computer and use it in GitHub Desktop.
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