diff --git a/packages/i18n-utils/src/locales.ts b/packages/i18n-utils/src/locales.ts index bdbfe5fb72888b..6e9fa1fd1d507b 100644 --- a/packages/i18n-utils/src/locales.ts +++ b/packages/i18n-utils/src/locales.ts @@ -8,6 +8,7 @@ export type Locale = string; export const i18nDefaultLocaleSlug: Locale = 'en'; export const localesWithBlog: Locale[] = [ 'en', 'ja', 'es', 'pt', 'fr', 'pt-br' ]; export const localesWithGoBlog: Locale[] = [ 'en', 'pt-br', 'de', 'es', 'fr', 'it' ]; +export const localesWithWpcomDeveloperSite: Locale[] = [ 'en', 'es' ]; export const localesWithPrivacyPolicy: Locale[] = [ 'en', 'fr', 'de', 'es' ]; export const localesWithCookiePolicy: Locale[] = [ 'en', 'fr', 'de', 'es' ]; export const localesWithLearn: Locale[] = [ 'en', 'es' ]; diff --git a/packages/i18n-utils/src/localize-url.tsx b/packages/i18n-utils/src/localize-url.tsx index c268f39ef2ddba..395c6cc9729395 100644 --- a/packages/i18n-utils/src/localize-url.tsx +++ b/packages/i18n-utils/src/localize-url.tsx @@ -4,6 +4,7 @@ import { useLocale, getWpI18nLocaleSlug } from './locale-context'; import { localesWithBlog, localesWithGoBlog, + localesWithWpcomDeveloperSite, localesWithPrivacyPolicy, localesWithCookiePolicy, localesToSubdomains, @@ -135,6 +136,7 @@ export const urlLocalizationMapping: UrlLocalizationMapping = { 'en.support.wordpress.com': setLocalizedWpComPath( '/support', supportSiteLocales ), 'en.blog.wordpress.com': setLocalizedWpComPath( '/blog', localesWithBlog, /^\/$/ ), 'apps.wordpress.com': prefixLocalizedUrlPath( magnificentNonEnLocales ), + 'developer.wordpress.com': prefixLocalizedUrlPath( localesWithWpcomDeveloperSite ), 'en.forums.wordpress.com': setLocalizedWpComPath( '/forums', forumLocales ), 'automattic.com/privacy/': prefixLocalizedUrlPath( localesWithPrivacyPolicy ), 'automattic.com/cookies/': prefixLocalizedUrlPath( localesWithCookiePolicy ),