MCPcopy
hub / github.com/datawhalechina/easy-vibe / getHreflangCode

Function getHreflangCode

scripts/generate-sitemap.mjs:279–293  ·  view source on GitHub ↗
(locale)

Source from the content-addressed store, hash-verified

277}
278
279function getHreflangCode(locale) {
280 const map = {
281 'zh-cn': 'zh-CN',
282 en: 'en',
283 'zh-tw': 'zh-TW',
284 'ja-jp': 'ja',
285 'ko-kr': 'ko',
286 'es-es': 'es',
287 'fr-fr': 'fr',
288 'de-de': 'de',
289 'ar-sa': 'ar',
290 'vi-vn': 'vi'
291 }
292 return map[locale] || locale
293}
294
295main()

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected