We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6639530 commit 0485a40Copy full SHA for 0485a40
1 file changed
_includes/languages.html
@@ -25,11 +25,10 @@
25
count = opts.length;
26
27
for ( var i = 0; i < count; i++ ){
28
- if ( -1 === opts[ i ].value.indexOf( window.location.pathname ) ) {
29
- continue;
+ // Only happens if you have language path on the start of the location.pathname
+ if ( 0 === window.location.pathname.indexOf( opts[ i ].value ) ) {
30
+ opts[ i ].setAttribute( 'selected', 'selected' );
31
}
-
32
- opts[ i ].setAttribute( 'selected', 'selected' );
33
34
} )();
35
</script>
0 commit comments