Skip to content

armgit / dify

Public Imported from GitHub
0

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

505 B
Raw Blame
import type { SelectorParam } from 'i18next'
import type { Namespace } from '@/i18n/resources'
import type { Metadata } from '@/next'
import { getLocaleOnServer, getTranslation } from '@/i18n/server'
import 'server-only'

export async function getRouteMetadata<T extends Namespace>(
  namespace: T,
  selector: SelectorParam<T>,
): Promise<Metadata> {
  const locale = await getLocaleOnServer()
  const { t } = await getTranslation(locale, namespace)

  return { title: t(selector, { ns: namespace }) }
}