i18n
i18n copied to clipboard
diffrentDomains dev: use the first subdomain for testing languages in dev/staging
Is your feature request related to a problem? Please describe.
feature request with example
Describe the solution you'd like
diffrentDomains works good in production, but in test I need to desribe again and again the real URL for every language
Describe alternatives you've considered
export function getLocaleDomain(locales) {
.....
const host = (getHost() || "").split(":")[0];
if (host) {
const first = host.split(".")[0];
const matchingLocale = locales.find(l => l.domain === host || l.code === first)
the idea is designed for dev/test/staging servers and similar.
he.test.local en.test.local ru.test.local he.staging.local ru2.staging.local
All of them will work, out-of-the box. If I need to test a diffrent box I need just use hostfile or DNS things.
Thanks