Category : internationalization

I am using i18n to translate my app like the following: <p-button class="plm-button e2e-button style-save" i18n-label="action:save,feature:aireport,screen:edit-0" label="Save"> </p-button> <p-button class="plm-button e2e-button style-cancel" i18n-label="action:cancel,feature:aireport,screen:edit-0" label="Cancel"> </p-button> When generating the messages.xlf file, not all the labels are there, for example, the save button’s label is generated, but the cancel no. Any explanation, please? Source: Ask Javascript..

Read more

I try to run vue cli vue add i18n to generate localisation using i18n to my local. It got error Done in 37.95s. ✔ Successfully installed plugin: vue-cli-plugin-i18n ERROR TypeError: Cannot read property ‘minVersion’ of undefined TypeError: Cannot read property ‘minVersion’ of undefined at module.exports.pkg (/mnt/disks/data_disks/teja/localised/forexsignals/node_modules/vue-cli-plugin-i18n/prompts.js:5:26) at invoke (/usr/local/lib/node_modules/@vue/cli/lib/invoke.js:74:25) at process._tickCallback (internal/process/next_tick.js:68:7) The i18n.js and ..

Read more

I’d like Intl.NumberFormat() to automatically convert between units from smaller to bigger ones based on common rules. I.e. a given number should be converted to between centimeters, meters, and kilometers in the output depending on how big the number is. Code examples: const bytes = 1000000; const transferSpeed = new Intl.NumberFormat(‘en-US’, {style: ‘unit’, unit: ‘byte-per-second’, ..

Read more

as you know, when changing the language through i18n, the length of the word changes. I want to animate the change in length. For this, I have a parent block whose width I change, using watch: { “$i18n.locale”: () => { document.getElementById(“nav”).parentElement.style.width = (100 * document.getElementById(“nav”).scrollWidth) / getMinSide() + “vmin”; }, }, function getMinSide() { ..

Read more

I’m using next-translate. By default, my routes are recognized as follows: /about <— /de/about /es/about but I’d like to enforce a locale for all paths: /en/about <— /de/about /es/about Here’s my config: next.config.js const nextTranslate = require(‘next-translate’); module.exports = nextTranslate({ … i18n: { localeDetection: false, locales: [‘en’, ‘de’, ‘es’], defaultLocale: ‘en’, } }); i18n.js module.exports ..

Read more

I’m working to translate a self-made extension. I have a problem with that code : let radiosCapture = { "Capture a page": () => { this.capture = new CaptureLink(this); let description = document.querySelector(‘meta[name="description"]’); if (description) { this.capture.description = description.content; } this.capture.start_capture(); }, "Capture an area": () => { this.capture = new CaptureZone(this); this.capture.start_capture(); } }; ..

Read more