Rocky_Mountain_Vending/.pnpm-store/v10/files/5a/c02d315d2949f0c273c4794fcaada6926dbd579c66c4374e6cc74de480551b81c7f170bf108b30ef9cf79c85c9885a57513a1e81ca7f522cebfd4e56a3b37a
DMleadgen 46d973904b
Initial commit: Rocky Mountain Vending website
Next.js website for Rocky Mountain Vending company featuring:
- Product catalog with Stripe integration
- Service areas and parts pages
- Admin dashboard with Clerk authentication
- SEO optimized pages with JSON-LD structured data

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-12 16:22:15 -07:00

20 lines
No EOL
991 B
Text

import { normalizePathTrailingSlash } from './normalize-trailing-slash';
const basePath = process.env.__NEXT_ROUTER_BASEPATH || '';
export function getDomainLocale(path, locale, locales, domainLocales) {
if (process.env.__NEXT_I18N_SUPPORT) {
const normalizeLocalePath = require('./normalize-locale-path').normalizeLocalePath;
const detectDomainLocale = require('./detect-domain-locale').detectDomainLocale;
const target = locale || normalizeLocalePath(path, locales).detectedLocale;
const domain = detectDomainLocale(domainLocales, undefined, target);
if (domain) {
const proto = `http${domain.http ? '' : 's'}://`;
const finalLocale = target === domain.defaultLocale ? '' : `/${target}`;
return `${proto}${domain.domain}${normalizePathTrailingSlash(`${basePath}${finalLocale}${path}`)}`;
}
return false;
} else {
return false;
}
}
//# sourceMappingURL=get-domain-locale.js.map