@takayukister Can you pleaase consider to always display the drop-down, even if there is no translation available yet for the particular page. So that the user knows that the web-site is translated in general?
The sugested code will not render the drop-down when only one language is available:
// if only 1 language, output nothing
if( $count <= 1 ) {
return '';
}
What dou you think about this additional improvement?
- The user selects a language for page having no translation.
- A modal pop up dialog informs the user that this page doesn’t exists in the selected language.
- Either redirect the user to a configured page for the selected language or remains on the current one.