Skip to content

Commit

Permalink
Merge pull request #272 from smorton-planview/ExportLocales
Browse files Browse the repository at this point in the history
Export locales so consumers can set language without duplicating code
  • Loading branch information
cyntler authored Jun 17, 2024
2 parents c15888e + 86c630e commit 7098f53
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/i18n.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ export const locales = {
se,
};

export const supportedLanguages = Object.keys(locales);

export type AvailableLanguages = keyof typeof locales;

export const defaultLanguage: AvailableLanguages = "en";
2 changes: 1 addition & 1 deletion src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ export default DocViewer;
export { DocViewerRenderers } from "./renderers";
export * from "./models";
export * from "./utils/fileLoaders";
export { type AvailableLanguages } from "./i18n";
export { type AvailableLanguages, supportedLanguages } from "./i18n";
export * from "./renderers";

0 comments on commit 7098f53

Please sign in to comment.