Skip to content

The open-source full-stack studio for Opus 5.5 motion video. Reverse engineering for any video. Code video with HTML: recreate, edit and render. BYOA + BYOK · Motion.md · Images, Video, Music & Voice.

419 B
Raw Blame
/** Prism locale aliases shared by the catalog and local clients. */
export function catalogLocale(locales: string[], requested: string, fallback: string): string {
  const normalize = (value: string) => value.toLowerCase() === 'zh' ? 'zh-cn' : value.toLowerCase();
  return [requested, 'en', fallback]
    .map(value => locales.find(locale => normalize(locale) === normalize(value)))
    .find(Boolean) ?? fallback;
}