Release v0.40.0
The language was in the URL and the page still said it in English. Verbaly has had two ways to carry a language since it could render at all, and has never named either of them, so which one you got was decided by whether you remembered to pass an optional field. Naming them turned up the thing that made the naming matter: a mirrored page translated everything a visitor looks at and left the <title> and the <meta description> in the source language, which is most of what a search engine shows and most of the reason to give a language its own address in the first place. Our own docs site shipped 27 of 27 pages that way. Breaking: one call signature changes, and it is the call that was silently wrong.
Highlights
- You can now say where the language lives in your URLs, once, in the config:
routing: 'prefix-except-source'(the default,/docsand/es/docs),'prefix-all', or'no-prefix'for one address in every language. Before this the answer depended on which helper you called and what you passed it. - The language switcher is one line and cannot be written wrong.
virtual:verbalyhands youlocalePathalready knowing your languages, your source and your mode, and the same line keeps working if you change your mind about the mode. - Your page title and description get translated too. They live in the head, nobody reads them on the page, and they are what a search result shows, so a page could look fully translated and still be indexed in English.
verbaly renderfills them and counts the pages that still do not. verbaly doctortells you which URL mode you are in, and says so when your config asks for two things that cannot both be true.- Breaking:
localePath(locale, { supported })without asourceLocaleno longer compiles under the default mode. It used to put a prefix on every language including your own, quietly, which was almost never what anyone wanted.
For the full details of this release, see the repository changelog.