diff --git a/docs/page.js b/docs/page.js index dc8c89fc2e2565cfd7ef3c9c7a5a80dbe8054749..83da14f909ac1cc0275c3fa70a916d6db5118144 100644 --- a/docs/page.js +++ b/docs/page.js @@ -35,6 +35,10 @@ function onDocumentLoad( event ) { case 'api': path = /\/api\/[A-z0-9\/]+/.exec( pathname ).toString().substr( 5 ); + + // Remove localized part of the path (e.g. 'en/' or 'es-MX/'): + path = path.replace( /^[A-z0-9-]+\//, '' ); + break; case 'examples':