diff --git a/src/BIMDataComponents/BIMDataGuidedTour/BIMDataGuidedTour.vue b/src/BIMDataComponents/BIMDataGuidedTour/BIMDataGuidedTour.vue index 0b82cb0a..b329d184 100644 --- a/src/BIMDataComponents/BIMDataGuidedTour/BIMDataGuidedTour.vue +++ b/src/BIMDataComponents/BIMDataGuidedTour/BIMDataGuidedTour.vue @@ -76,7 +76,7 @@ color="granite" @click="close" > - Skip + {{ translate("skip") }} @@ -95,7 +95,7 @@ color="granite" @click="close" > - Commencer + {{ translate("continue") }} @@ -125,6 +125,7 @@ import { setSpotlightPosition, setTooltipPosition, } from "./guided-tour-utils.js"; +import trads from "./i18n.js"; import BIMDataButton from "../../BIMDataComponents/BIMDataButton/BIMDataButton.vue"; import BIMDataIcon from "../../BIMDataComponents/BIMDataIcon/BIMDataIcon.vue"; @@ -135,6 +136,10 @@ export default { BIMDataIcon, }, props: { + locale: { + type: String, + default: "en", + }, tours: { type: Array, default: () => [], @@ -333,6 +338,9 @@ export default { this.mutationObserver.disconnect(); } }, + translate(key) { + return (trads[this.locale] || trads["en"])[key]; + }, }, }; diff --git a/src/BIMDataComponents/BIMDataGuidedTour/i18n.js b/src/BIMDataComponents/BIMDataGuidedTour/i18n.js new file mode 100644 index 00000000..9bd51330 --- /dev/null +++ b/src/BIMDataComponents/BIMDataGuidedTour/i18n.js @@ -0,0 +1,16 @@ +const en = { + skip: "Skip", + continue: "Continue", +}; + +const fr = { + skip: "Passer", + continue: "Continuer", +}; + +const trads = { + en, + fr, +}; + +export default trads;