Locale
이 콘텐츠는 아직 번역되지 않았습니다.
locale allows setting Locale-specific settings
import { defineStudioCMSConfig } from 'studiocms/config';// ---cut---export default defineStudioCMSConfig({ locale: { dateLocale: 'en-US', dateTimeFormat: {}, i18n: {} },});dateLocale
Section titled “dateLocale”dateLocale is a BCP 47 locale identifier used for date formatting.
- Type:
string - Default:
'en-US'
import { defineStudioCMSConfig } from 'studiocms/config';// ---cut---export default defineStudioCMSConfig({ locale: { dateLocale: 'en-US', // DEFAULT - This sets the date locale for date formatting. }})dateTimeFormat
Section titled “dateTimeFormat”dateTimeFormat is an object that is used to configure the date time format.
- Type:
Intl.DateTimeFormatOptions - Default:
{}
import { defineStudioCMSConfig } from 'studiocms/config';// ---cut---export default defineStudioCMSConfig({ locale: { dateTimeFormat: { year: "numeric", month: "short", day: "numeric" }, }})i18n is an object that is used to configure internationalization options.
- Type:
object - Default:
{}
import { defineStudioCMSConfig } from 'studiocms/config';// ---cut---export default defineStudioCMSConfig({ locale: { i18n: { defaultLocale: 'en', }, }})