Questions tagged [internationalization]

The concept of Internationalization, abbreviated as i18n (with "i" representing "internationalisation," followed by 18 more letters, and ending with "n"), involves strategically designing and developing products and services to facilitate seamless adaptation into different local languages and cultures. This process, known as localization, enables easy customization for specific regions. Occasionally referred to as translation or localization enablement, internationalization plays a crucial role in ensuring global relevance and accessibility.

Utilize existing *.resx translation files within a hybrid application combining AngularJS and Angular 5

Greetings! I currently have an AngularJS application that utilizes $translateProvider for internalization and WebResources.resx files: angular.module('app') .config(['$translateProvider', 'sysSettings', 'ngDialogProvider', function($translateP ...

Internationalization in Angular (i18n) and the powerful *ngFor directive

Within my Angular application, I have a basic component that takes a list of strings and generates a radio group based on these strings: @Component({ selector: 'radio-group', templateUrl: `<div *ngFor="let item of items"> ...

Issue with next-intl plugin when choosing enum-based values is not functioning correctly

For my next.js project (version 13.4), I was in need of next-intl translation support. I followed the official example provided at The example mentioned to define the following code in the 'en.json' file: "message": "{gender, select, female ...

"Enhancing User Experience: Implementing Internationalization and Nested Layouts in Next.js 13.x

In the midst of working on a cutting-edge Next.js 13 project that utilizes the new /app folder routing, I am delving into the realm of setting up internationalization. Within my project's structure, it is organized as follows: https://i.stack.imgur.c ...

What is the most effective approach for creating a page that is exclusive to a specific locale when utilizing i18n in Next.js?

Utilizing Next.js's Internationalized Routing feature, my website automatically generates localized routes for each static page. For instance, if I have locales set as gb, us, and fr, with gb being the default, a page named my-page.tsx would yield: http:/ ...

Leveraging an external global variable file that is not incorporated into the bundle

I have a JavaScript file dedicated to internationalization. I am looking for a way to provide this file to clients for them to edit without requiring me to rebuild the entire project. Currently, I store this file in the static folder so it is included in ...

Configuring the timezone for the database in CakePHP

To ensure my CakePHP application is internationalized, I am setting the timezone for PHP and MySQL. When a client sends a request to the server, before processing the request, the server connects to a GeoIP location server to retrieve the timezone. I then ...

What is the method for retrieving the locale value from the configuration in Next.js?

How can I retrieve the i18n.defaultLocale value from my Next.js app configuration? I thought it would be simple, but I'm struggling to find a clear solution for accessing the config settings in Next.js. Is there a specific built-in method for this, or ...

Next.js 13 now allows for easily translating URLs using the App directory and next-intl feature

Currently, I am working on a Next.js 13 application that supports multiple languages and utilizes the next-intl package for internationalization. I have been attempting to configure translated URLs for my routes, but have encountered some challenges. For ...

Troubleshooting VueJs and vue-i18n issues

Currently, I am utilizing the Webpack CLI Template. As a next step, I proceed to install using the command npm install --save vue-i18n Within my main.js file, I undertake the necessary importation and configuration by setting the locale to "en" import ...

Tips for dynamically updating localeData and LOCALE_ID for i18n websites during the build process in Angular 9

I am currently developing an application that needs to support multiple languages, specifically up to 20 different languages. The default language set for the application is en-US. The translated versions are generated successfully during the build proces ...

The implementation of a universal translation system in Express JS

I have developed a straightforward translation module for Express JS. It exists as a global object in the application scope and is initialized during application runtime: translator.configure({ translations: 'translations.json' }); I have i ...

A guide to modifying ts files according to language with angular localization

My application has files named errors.ts and content.ts containing English content, as well as errorsEs.ts and contentEs.ts with Spanish content. I am currently implementing JIT compiler angular localization for language translation. Throughout the app, I ...

Encapsulate the module function and modify its output

I am currently utilizing the node-i18n-iso-countries package and I need to customize the getNames function in order to accommodate a new country name that I wish to include. At the moment, I am achieving this by using an if-else statement like so: let cou ...

Discovering the browser's language using NextJS' integrated i18n feature

Is it possible to incorporate language detection in Next.js using the default functionality, or will I need to rely on a third-party package? I wasn't able to locate any information about this in the documentation. I would like the initial language to be ...

Upcoming: NextJS version 10 introduces enhanced i18n capabilities with the ability to customize folder names in

I am trying to create a multi-language website where I need to translate a specific folder differently for each language. The folder structure in question is as follows: pages/kennis/index.tsx I am having trouble figuring out how to translate the "kennis" ...

`How can you adjust the language preferences for users in Meteor?`

My website is internationalized using the tap-i18n plugin. I am looking to allow users to switch between languages on the site. Currently, I have a file called client/setLanguage.js where I set the language on startup: getUserLanguage = function () { ...

How can localization be achieved in an express app using i18n + handlebars without using it to generate output HTML?

I have an Express application where I need to utilize Handlebars for creating localized email templates. The challenge here is that Handlebars necessitates a globally registered helper to translate elements within the .hbs files, while I require using a co ...

Changing the locale in Vue I18n results in the disappearance of the component's content

Currently, I am in the process of integrating Vue I18n into my application. The issue I am facing is that when I switch the language using a locale switcher (without reloading the page), the translated strings appear correctly but the content above them di ...

When was Chrome first updated to include timezone offset support for Intl.DateTimeFormat()?

My experience with Chromium 121 has been positive using the Intl.DateTimeFormat as shown below: new Intl.DateTimeFormat('en', { dateStyle: 'long', timeStyle: 'long', timeZone: '+0500', }).format(new Date()); > 'February 18, 2024 a ...

AWS Amplify is failing to display i18n translations on dynamic pages within Next.js (directory structure)

Currently experimenting with the next-i18next package within a Nextjs project. Encountering an issue specifically on dynamic pages like: /blogs/[id], where i18n seems to struggle to translate the content properly, displaying keys rather than actual transla ...

Exploring the discrepancies in utilizing the i18n library versus directly incorporating locale from JSON in vue.js

Recently, I decided to incorporate Chinese language into my Vue app. To achieve this, I loaded the entire JSON text into Vuex and utilized the stored text directly, instead of relying on an i18n library. I'm curious to know if there are any potential ...

Implementing dual language codes for a single locale in internationalization (i18n) efforts

I am currently using i18n to display translations in English and Japanese. The default language is set to English with the code en, but I have recently discovered that my website is not utilizing the correct ISO language code for Japanese, which should be ...

Implementation of the I18next library

I am currently integrating react-i18next into my application to implement a switch button for French and English languages. Unfortunately, I am facing some issues as the translation is not working properly. I suspect it's related to the JSON file recogniti ...

Tips on fixing server/client content mismatch caused by browser auto translate

While constructing a website with next14, storyblok, and i18n, I encountered an issue in the browser related to the automatic Google translate feature for Georgian and English languages. Despite setting Georgian as the default language in my app, when swit ...

Is it possible to pass a specific region to a language in nextjs i18n?

Suppose I am in favor of the languages ['en', 'de']. In this case, I would like to redirect requests with a header such as Accept-Language: de-DE to de since it is the most closely related to what I support. // Below is my i18n configuration module.exports ...

Encountering a favicon issue in Next.js 14 after restructuring the project to implement Internationalization

Having trouble with favicon display in Next.js 14.0.2. The issue cropped up after implementing internalization and reconfiguring my project structure. Here is a simplified view of my project structure: - app - [lang] - _components - _dictionaries ...

Tips for effectively internationalizing white-labeled PHP code

In my current code base, I have the ability to customize it for various customers. This customization is typically done by loading a class with customer-specific constants, all having the same class name. To avoid any collisions, only one set of constants ...

Localizing content in AngularJS by using filters

I am currently working on an application that requires translation into multiple languages. However, when I use filters such as number or currency, the results are displayed in the default localization. In my research, I discovered that it is possible to ...

React Native - Customizing drawer position according to app's language

Working with react native and react navigation for routing in my application that supports both English and Arabic languages. When a user switches from English to Arabic, the application reloads successfully but the drawer position does not change. Here&a ...

What is the best way to eliminate the [lang tag] from a URL in Next.js?

I am looking to eliminate either the /en or the /it from the URL without explicitly adding it. i18next seems to be doing it automatically, and I am unsure how to disable this behavior. I simply want it to happen in the background. https://i.stack.imgur.co ...

Getting URL parameters in NextJS when using Custom Document can be achieved by accessing the `ctx`

Currently, I am utilizing NextJS for generating SSR pages that are language-specific. I want to specify the lang property to indicate the language of the text. Here's what I have done so far: import Document, { Html, Head, Main, NextScript } from "ne ...

Problem with Next.js router language settings

I have configured different locales for our application including uk and us. For the blog section, we can use either us/blog or just /blog for the uk locale. After switching to the us locale like this: (locale = "us") const updateRoute = (locale ...

Tips for maintaining i18n locale slugs and ensuring i18n consistency when reloading in Next.js

I'm currently utilizing next-translate. The default recognition of my routes is as follows: /about <--- /de/about /es/about However, I would like to set a specific locale for all paths: /en/about <--- /de/about /es/about Below is ...

Exploring Angular localization using ng2-smart-table

Currently, I am utilizing ng2-smart-table. In my component.ts file, I am setting the column headings. settings = { actions: { add: false, edit: false, delete: false }, columns: { date: { title: 'Date' ...

next-intl failing to identify the primary language setting

When testing next-intl for the app directory in the Next.js v13.4.0, I encountered an issue where the default locale was not recognized. Despite following the documentation step by step, I also faced significant challenges with the client-side version in p ...

Utilizing i18n in Koajs for Internationalization

Currently, I am in the process of maintaining a Koa web application which is built using koa-scaffold. My client has requested internationalization (i18n) functionality, so I have implemented the koa-i18n package for this purpose. Initially, I had set up s ...

A guide on utilizing Symfony 1.4 to extract i18n translations using catalogues

Is it possible to retrieve all the translations (both translated and untranslated) from a specific catalog using Symfony 1.4? I am currently utilizing the default message source (XLIFF). It is crucial for me to extract these strings from another applicatio ...

Automated page redirection is not supported in Next.js i18n

Why does the homepage redirect correctly, but not the subpages? For example, when my browser language is set to French: When I open the homepage example.com, I am automatically redirected to example.com/fr - which is working fine! However, if I open a su ...

Formatting numbers in Angular 2 to include a space every three zeros in a money amount

Let's say I have the number 30000 and I want to format it as 30 000. What method should I use to achieve this? Here are more examples: 300000 -> 300 000, 3000000 -> 3 000 000. Just to clarify, this is not about using dots or commas, but rather recognizi ...

Utilizing Vue.js and i18n to fetch external JSON files from a server and seamlessly integrating them as globally accessible data in all components

I'm currently exploring ways to fetch translation files from a server and make them accessible across all components of the project. For instance, I can request to obtain this JSON: { "DASHBOARD_SETTINGS": "Einstellungen", &qu ...

Localization with a separate domain for i18n in Python files

I'm seeking clarification on how to handle i18n translations within py files. I have a string that requires translation, and the content is already included in the plone domain in plone.pot. Therefore, I want to specify the domain as 'plone' for this parti ...

Error: Missing provider for InjectionToken DEFAULT_LOCALE

I have been exploring the setup of an Angular 2 project with i18n. I followed a tutorial here that uses Transloco, and everything seemed to work perfectly. However, when running the unit tests, I encountered an error that I couldn't find any information ab ...

Customize the formatting of linked locale messages in Vue's internationalization (i18n) feature using parameters

Is there a way to link locale messages in vue-i18n with a parameter? { "next": "Next step {step+1}: @:steps[{step}]", "steps": [ "Welcome", // 0 "Briefing", // 1 "Finish" // 2 ...

What is the method for configuring Vue to utilize a value other than the value property in form fields?

I am facing a unique challenge. Consider this: <select name="screw[type]" v-model="form.screw.type"> <option value="My value" ><?php _e('My value', 'fiam'); ?></option> //[...] Now, in another part of my code, I have this: ...

Having trouble accessing the name property of a select dropdown in Material UI React

Currently, I am facing an issue with implementing a select dropdown. When handling the onChange method, I am encountering a situation where event.target.name is undefined. Specifically, when I choose the 1st option, I want to be able to access 'Englis ...

React Intl: Asynchronously loading a singular locale's data in a Universal Application

Hey there, I'm currently working on a universal app that supports multiple languages using React. I'm facing challenges with handling locale data efficiently. The app will be available in 16 different languages with a large amount of translated m ...

The language is being detected, but the translation feature is not functioning properly with i18n

I've configured the i18n middleware in my Express Node js server as follows: // server.js import i18nMiddleware from 'i18next-express-middleware'; import i18n from 'i18next'; import Backend from 'i18next-node-fs-backend'; import { LanguageDetector } from ' ...

The Next.js 13 internationalization website continues to redirect to the locale page despite my attempts to remove it

While working on my app with NextJs, I attempted to implement localisation, but it ended up causing confusion and issues. The application started lagging on the i18n route and became unresponsive, even after multiple attempts of restarting the development ...

Why does i18next only function on http://localhost:3000/de (landing page) in NextJS and not on http://localhost:3000/de/about?

I'm new to this and feeling lost on how to tackle this issue. I tried following the instructions on https://github.com/i18next/next-i18next, but I'm struggling with index.js. When I toggle /de on my landing page, it translates correctly in the URL "http:// ...

Exploring the integration of client components within NEXTjs

I'm currently facing a challenge in my project that involves translating content into 4 different languages. Despite watching numerous tutorials and attempting various solutions, I keep encountering the same issue. Within my application, there are man ...

New options for outdated Webpack i18n plugin and loader

I am currently working on a TypeScript project that requires loading translations from individual .json files assigned to each country. For instance, we would have separate language files like en.json, es.json. The goal is to be able to access these trans ...

What is the best way to reference an i18n entry within .json files?

I am in the process of creating a user interface using SAP UI5 and my goal is to make all text elements internationalized. Below is a snippet of my view in .xml format where I successfully retrieve text in different languages using placeholders enclosed i ...

Start Transloco in Angular before the application begins

For our Angular project, we have implemented Transloco to handle translations. Within my typescript code, I am using the transloco service in this manner: this.translocoService.translate('foo.bar') I understand that it is crucial to ensure that the transl ...

Exploring Next.js with getStaticPaths for multi-language support

In my current Next.js project, I am working on implementing multiple locales for dynamic pages using i18n. Within my next.config.js file, the following configuration is set: module.exports = { i18n: { locales: ["en-US", "da-DK", "se-SE", "no-NO", "n ...

Issue with Angular 12 SSR: Translation file paths are not being properly retrieved

In my Angular project, I have a file located at src->app->lang-translate->lang-translate.module.ts that is trying to access files from other locations as shown below: {prefix: "../../assets/translate/Pages/header/", suffix: ".json"}, {prefix: "../../assets ...

When using translate.get with an array of strings in Angular 5, the function will return both the keys and values, not just

Currently, I am utilizing Angular 5 to manage internationalization through ngx-translate within my code. To elaborate on the issue at hand, I have a data table that pulls information from a web service and displays it correctly. There is also a button tha ...

Encountered an i18n NextJS error: The FS Module is not found and cannot resolve 'fs' within a specific component

Hello everyone, this is my first time asking a question here so please bear with me if I make any mistakes in formatting or anything else. I'm here to learn. I have a query regarding running code from index.js for translation purposes: import React from 'r ...

Employ the next-intl library in a non-react component scenario

Is there a way to utilize next-intl outside of a React component? Currently, I am obtaining the t by utilizing the hook useTranslations, and then passing its instance to my function: function formatFoo(t, foo) { if .... t('bar'); } export def ...

Developing a tool for switching between languages in an internationalization application

I have been exploring the implementation of Lingui(i18n) in apps. All set up, but I'm interested in adding a language switcher to enable users to change between language catalogs on my app. Here's my index.js file: import React, { useEffect } fr ...

How can I automatically refresh the page when switching languages using @shopify/react-i18n?

Even though I am using MobX to store the state of the language and changing the locale in the I18nContext.Provider, the translations on the page do not change when switching languages. This is my custom hook: import {useI18n} from "@shopify/react-i18n"; i ...

Is it possible to make an object available on every route using jade and express?

Utilizing express and jade in my nodejs application, I am faced with the challenge of accessing the same object containing configuration and localization data on every route. I have currently implemented it as follows: loadLoginPage: function(req, res) { ...

Encountering a problem with React i18next while transitioning to next.js: Getting an error message stating "Text content does not match server-rendered

After successfully migrating from react-router-dom to next.js, I encountered an issue with the internationalization of React-i18next. The file name was changed from i18n.js to next.config.js, but an error message 'Error: Text content does not match server- ...

Can you explain the variances between ngx-translate and ngx-i18next for me?

As ngx-i18next serves as a wrapper for i18next, I am curious about the specific differences in translation capabilities between ngx-translate and i18next. ...

The React Intl function is returning variables that are of [object Object]

I am currently experimenting with using react intl for translating my website. You can find more information about it on Github Here is an example of the json lang files I am working with: fr.json : { "errorPage.title": Erreur 404" } en.json : { ...