Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

298 B
Raw Blame
export interface LocalizedLinkMap {
  [key:string]:string;

  en:string;
}

/**
 * Return the matching link for the current locale
 *
 * @param map A hash of locale => URL to use
 */
export function localizeLink(map:LocalizedLinkMap) {
  const { locale } = I18n;

  return map[locale] || map.en;
}