Merge pull request #775 from gbatkhuyag/feat/mn-locale-support

feat(i18n): add Mongolian locale support
This commit is contained in:
Linus Rath
2026-08-11 17:34:46 +02:00
committed by GitHub
5 changed files with 3410 additions and 1 deletions
+19
View File
@@ -305,6 +305,24 @@ const skHills =
" 31.32-15.07 71.16-39.58 96.13-79.28-6.43-11.3-16.52-23.5-30.25-23.5" +
"a30.52 30.52 0 0 0-27.69 16.34s-13.32-34.46-38.19-34.46Z";
/** Mongolia – Red, Blue, Red vertical tricolor with Soyombo */
export function FlagMN(props: FlagProps) {
return (
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 900 600" width={W} height={H} className={flagClass} {...props}>
<path fill="#c4272f" d="M0 0h225v600H0Z" />
<path fill="#015197" d="M225 0h450v600H225Z" />
<path fill="#c4272f" d="M675 0h225v600H675Z" />
<g fill="#f9cf02" transform="translate(74 78)">
<circle cx="38" cy="34" r="18" />
<path d="M22 68h32v108H22ZM16 194h44v16H16ZM20 226h36v116H20ZM16 358h44v16H16Z" />
<path d="M24 390h28l-14 42ZM70 76h18v280H70Z" />
<path d="M104 128h64v18h-64ZM104 232h64v18h-64Z" />
<path d="M136 152c-22 0-40 18-40 40s18 40 40 40 40-18 40-40-18-40-40-40Zm0 18c12 0 22 10 22 22s-10 22-22 22-22-10-22-22 10-22 22-22Z" />
</g>
</svg>
);
}
/** Slovakia – White, Blue, Red horizontal with coat of arms */
export function FlagSK(props: FlagProps) {
return (
@@ -335,6 +353,7 @@ export const flagComponents: Record<string, (props: FlagProps) => ReactElement>
ja: FlagJP,
ko: FlagKR,
lv: FlagLV,
mn: FlagMN,
nl: FlagNL,
pl: FlagPL,
pt: FlagBR,
+1
View File
@@ -32,6 +32,7 @@ const languages = [
{ value: 'uk', label: 'Українська' },
{ value: 'ko', label: '한국어' },
{ value: 'ja', label: '日本語' },
{ value: 'mn', label: 'Монгол' },
{ value: 'zh', label: '简体中文' },
];
+3
View File
@@ -75,6 +75,9 @@ export default getRequestConfig(async ({ requestLocale }) => {
case 'lv':
messages = (await import('../locales/lv/common.json')).default;
break;
case 'mn':
messages = (await import('../locales/mn/common.json')).default;
break;
case 'nl':
messages = (await import('../locales/nl/common.json')).default;
break;
+1 -1
View File
@@ -12,7 +12,7 @@ const localePrefix = (process.env.NEXT_PUBLIC_LOCALE_PREFIX ?? 'never') as
| 'always'
| 'as-needed';
const SUPPORTED_LOCALES = ['ar', 'ca', 'cs', 'da', 'de', 'en', 'es', 'fa', 'fr', 'he', 'hu', 'it', 'ja', 'ko', 'lv', 'nl', 'pl', 'pt', 'ro', 'ru', 'sk', 'tr', 'uk', 'zh'] as const;
const SUPPORTED_LOCALES = ['ar', 'ca', 'cs', 'da', 'de', 'en', 'es', 'fa', 'fr', 'he', 'hu', 'it', 'ja', 'ko', 'lv', 'mn', 'nl', 'pl', 'pt', 'ro', 'ru', 'sk', 'tr', 'uk', 'zh'] as const;
// Fallback locale used when the visitor's Accept-Language header does not
// match any supported locale (and no NEXT_LOCALE cookie is set yet). Admins
File diff suppressed because it is too large Load Diff