11,819 questions
1
vote
1
answer
123
views
How do I select the right language for my C program's output?
I am writing a C application, to be distributed as a single static binary (so it doesn't have a chance to do anything like install message catalog files). It only needs to support a few natural ...
0
votes
0
answers
27
views
Why default language doesn't redirect me to /fa?
import { defineI18n } from "fumadocs-core/i18n";
export const i18n = defineI18n({
defaultLanguage: "fa",
languages: ["en", "fa", "cn"],
...
Advice
1
vote
0
replies
48
views
Does CLDR specify language-specific versions of "Label: Text"?
In German and English, we use a colon followed by a space to separate a term from its explanation, or a label from the text that follows. But other languages do it differently. Rather than have a &...
0
votes
2
answers
42
views
Next.js multilingual routing. Main page site.com always redirect to site.com/en instead of staying on site.com
devs!
I'm trying to build a multilingual website based on Next.js(15.6) Node 22.21.10. Locally I have no issue with routing everything works as expected. Both lang versions are served as expected. (...
1
vote
1
answer
88
views
What to use instead of KeyboardEvent.keyCode for keyboard shortcuts across different layouts?
I have an application that relies on the deprecated keyCode property for keyboard shortcuts. I need to update my code to use a modern alternative that works consistently regardless of the user's ...
0
votes
1
answer
88
views
Is the lack of orthographic variant support for Scandinavian languages in the JavaScript Intl API a known limitation?
Official spelling reforms in Scandinavian languages in the 19th and 20th centuries replaced digraphs (two-letter combinations) with single, distinct letters:
Danish: å = aa, æ = ae, ø = oe;
Swedish: ...
1
vote
1
answer
75
views
iOS internationalization: What's the meaning of the placeholder?
Within "Localizable.xcstrings" string-catalog, for example "%lld click" or even more cryptic "%1$@-%2$@"?
What's there meaning? How have it to read and understood?
0
votes
0
answers
53
views
nestjs use i18n in decorators of class-validator without indicate one by one
I'm researching that can I use i18n for the messages of validation exceptions. For example:
create-user.dto.ts
export default class createUserDto {
@MinLength(5)
@IsString()
name: string;
}...
-1
votes
2
answers
85
views
How to enforce identical keys across multiple i18n JSON translation files in TypeScript?
I’m working on a multilingual application with the following structure:
messages/
├── en.d.json.ts // baseline type definition
├── en.json
├── ja.json
├── zh-CN.json
└── zh-TW.json
Each file has ...
0
votes
2
answers
104
views
How to semantically indicate that a webpage is available in multiple languages
Is there a standard way that an HTML page written in one (human) language can indicate that a translation is available in another language? I know that I can mark up some text manually, saying ...
0
votes
0
answers
32
views
Vite warning about importing from /public from generated file by i18next-resources-for-ts cmd
The command i18next-resources-for-ts toc generates ressources.ts that imports from /public causing vite to spam warning when serving the app.
Assets in public directory cannot be imported from ...
0
votes
0
answers
87
views
Nuxt 3 with i18n missing translations all the sudden
Out of the blue my Nuxt 3 project (which has been running fine for over 8 months) is missing translations. Translations which are clearly in the correct files.
Also, when building the project, some of ...
25
votes
13
answers
3k
views
How can I parse a string to a float in C in a way that isn't affected by the current locale?
I'm writing a program where I need to parse some configuration files in addition to user input from a graphical user interface. In particular, I'm having issues with parsing strings taken from the ...
0
votes
0
answers
39
views
Hugo i18n translation
In hugo, We can specify i18n translation keys for specific edition, but if the key is not present in the specific lang like es-xl.yaml, it should take the translation available from the default lang ...
0
votes
0
answers
94
views
How to internationalize existing database entries in a Full Stack project using Vite + i18n?
I’m building a Full Stack project where users can create items. Currently, the data is stored in the database in Portuguese (pt-BR). On the front-end, I’m using Vite + i18n to support multiple ...
2
votes
0
answers
96
views
Payload CMS - i18n not working for REST API error messages
I'm using Payload CMS with a Next.JS frontend and axios for fetching data via the provided REST API. I need i18n support for the content as well as the interface, e.g. error and validation messages.
...
0
votes
1
answer
80
views
Force change the language of my current input keyboard programmatically in Android
We are building a Multi-Lingual Business Application -- where the user is able to enter values and data in multiple languages.
One of our main use cases is, if a user is editing or adding to a text ...
2
votes
1
answer
349
views
Tailwind doesnt apply on my Next JS 15 app
I wanted to implement multilanguage support with next-intl and I changed my file structure like this:
app/
favicon.ico
globals.css
[locale]/
layout.tsx
page.tsx
(root)/
...
1
vote
1
answer
64
views
Can I set a language attribute on the col element of a table
I have a table that has mixed languages. One column has English and the other column has another language. Is it possible to set the language for that column at a column level or do I need to set the ...
0
votes
0
answers
44
views
How do I combine i18n-ally with Kaisermann/svelte-i18n library
I'm doing some internationalization with a Svelte project, and I'm using i18n-ally to do the language editing. i18n-ally does a great job of turning a block of code from:
<p>Copyright © ...
0
votes
1
answer
116
views
How to Combine Next.js 14 Middleware with next-intl for Localization, Province Subdomain Rewrites, and CORS?
I'm working on a Next.js 14 (and I want to configure localization) project using the App Router and need to combine three middleware functionalities:
Province subdomain rewrites
Localization with ...
2
votes
1
answer
71
views
Equivalent of `supportedLocalesOf` for letter-case conversion (`toLocaleLowerCase`, `toLocaleUpperCase`)?
In JavaScript, you can introspect support for various internationalization functionality by use of static supportedLocalesOf methods of the various classes namespaced under Intl. For example:
Intl....
0
votes
0
answers
44
views
How to configure middleware to run and be debugged in next.js
Ultimately, I want to route requests to pages within subdomains in my next.js application. If I specify the correct subdomain in a route, I believe that I need to have a middleware.ts file under the ...
2
votes
1
answer
123
views
How do printf precision and internationalization interact?
The printf(3) man page writes about precision (in both Linux and NetBSD):
This gives the minimum number of digits to appear for d, i, o, u, x, and X conversions
If one writes printf("%.10d"...
0
votes
0
answers
135
views
How to handle i18n in a hybrid Next.js app using both /pages and /app directories?
I'm currently migrating a large Next.js project from the old /pages directory to the new /app directory (App Router). This migration will likely take a long time (possibly 1–2 years), so for now, I ...
0
votes
0
answers
54
views
Can I filter by multiple locales in a single Strapi v4 REST API request?
I'm using Strapi v4 with the Internationalization (i18n) plugin enabled. While testing locale filtering through the REST API, I tried the following request:
GET /api/articles?locale=en-US&locale=...
1
vote
0
answers
75
views
Intl.DisplayNames with type: "language" can't recognize certain languages on mobile
Intl.DisplayNames can't recognize certain languages when running on mobile.
Running the following code:
const displayNames=new Intl.DisplayNames(["en-US"], {type:"language"})
console.log(displayNames....
0
votes
0
answers
37
views
Add Angular i18n translations from outside the project
When using @angular/localize, we mark string to translate with i18n* attributes in the templates and use $localize in the components code. Those string are then extracted with ng extract-i18n into an ...
0
votes
0
answers
29
views
Why there's a noticable delay when translating text on ReactNative?
I implement a poor-man's i18n like this:
import AsyncStorage from '@react-native-async-storage/async-storage';
// translates a phrase given "lang"
// if lang is empty, null, or undefined, ...
1
vote
1
answer
47
views
Only plain objects can be passed to Client Components from Server Components (i18next + dynamic import)
I'm working on a Next.js app with App Router and I'm implementing localization using i18next with dynamic JSON imports for translations. I'm running into the following error:
Error: Only plain objects,...
1
vote
0
answers
95
views
404 Error when trying to login with Clerk in Next.js app using next-intl for internationalization
I'm building a Next.js application using Clerk for authentication and next-intl for internationalization. Everything was working fine until I tried to implement the login functionality. Now I'm ...
0
votes
0
answers
57
views
SQLAlchemy_i18n creating translations causes errors
I have a strawberry graphql app that's using SQLAlchemy for models, and SQLAlchemy_i18n for internationalisation. I've followed the basic setup guide for i18n on the package docs but I just can't seem ...
1
vote
1
answer
89
views
Should one use `lang` attributes for proper nouns and loanwords?
I understand the various reasons to use the HTML lang attribute for pages and content-within-pages of different languages,1 but there are two specific cases where I'm not sure whether or not to use it:...
0
votes
0
answers
52
views
Can I apply different .textlintrc.json to different directory under the same workplace in VSCode?
I have my own tech blog made by Hugo, which supports multiple languages. And each of the directories for the posts are like:
content\ch\posts
content\ja\posts
content\en\posts
And I write the posts ...
0
votes
1
answer
89
views
Time Zone name to Internalization [duplicate]
Intl.supportedValuesOf('timeZone')
Above code will give list of all time zone in en-US like below
["Africa/Abidjan", "Africa/Accra" , "Africa/Addis_Ababa", ...]
Is ...
0
votes
1
answer
113
views
Is there a way to use lazy load in conjunction with initial resources for `react-i18next`?
I'm using i18next with React and Vite for loading the translation for my app. In the app, I have a child component that allows users to set a banner message in some languages, and it uses a key from ...
0
votes
0
answers
44
views
How to Validate Multiple Translations at Once with Mobility Gem?
I’m using the Mobility gem to handle translations in a Rails model and I’m encountering an issue when trying to validate translated attributes like name and description across multiple locales at once....
1
vote
2
answers
112
views
Is setlocale() in C restricted to locales shown by “locale -a”?
It seems like setlocale() in C (at least on Linux) only works if the locale you’re trying to set it to is one of those listed in the output of locale -a. Is this really true?
The reason I ask to ...
1
vote
1
answer
137
views
What's the best way to handle translatable strings in Swift? [closed]
I'm currently exploring the different options Swift provides for handling string localization. I would like to choose the right option.
Meanwhile I'm more confused, instead of becoming more sure. ...
0
votes
2
answers
214
views
Should I add l10n/app_localizations.dart to version control?
I have upgraded my Flutter project to not use a synthetic package.
There are now files generated under
lib/l10n/app_localizations.dart
lib/l10n/app_localizations_de.dart
lib/l10n/app_localizations_en....
1
vote
2
answers
472
views
Correct way to set i18n language with vue-i18n and typescript
I'm trying to dynamically change the language and persist it with localStorage, I use vue3 + vue-i18n + typescript.
According to the official documentation, I should use composite API and modify i18n....
0
votes
0
answers
36
views
404 Page not Displaying in Localized Next.js 14 App
I have a localized Next.js 14 app. I followed the setup described in the Nextjs i18n docs, and I have my root layout within an /app/[lang] directory. When I add a 404 page to this directory (/app/[...
0
votes
0
answers
51
views
Next.js - localized static builds for each language
I need to generate a simple static website build for all the languagues defined in translations.json and I've decided to use Next.js with Page router. Let's say I have:
en: {
title: 'Hello World',
...
0
votes
0
answers
69
views
HydrationError when using next-i18n with Next.js and TypeScript
I am trying to implement internationalization using react-i18n in my frontend application.
The application uses TypeScript and Next.js.
I have set up two languages, English and Finnish, along with a ...
0
votes
0
answers
55
views
i18n Localization text comment issue after angular upgrade 17 - 18
Upgraded the angular project from 17 to 18. After upgrade the text where I user i18n localization are being comment out on runtime. It works in starting and then all the localization text HTML gets ...
0
votes
0
answers
48
views
Unable to remove unused i18n dynamic keys
I have a react codebase which uses i18n react package, we have couple of translation files, in some of the components we generate translation keys dynamically for instance
priority__HIGH: "High&...
0
votes
0
answers
94
views
How to refactor a string into a ARB resource in Dart/Flutter?
I am working on a legacy Flutter app which does not have translations.
I need to create many resource entries in the ARB file and then replace the text by AppLocalizations.of(context).something.
Is ...
0
votes
0
answers
17
views
i18n.service file is not loading in angular
I recently upgraded my Angular application from version 17 to version 18, but I am still using NgModules.
Upgrade Process: During the upgrade, I did not encounter any errors, and the application ...
2
votes
0
answers
230
views
How to set up next-sitemap to properly generate robots.txt and sitemap.xml for NextJS app router with strapi internationalization?
I created website with NextJS 15 using app router and Strapi as my CMS and internationalization tool. Website works properly but my robots.txt and sitemaps generate wrong. They aren't accessible with ...
0
votes
0
answers
37
views
Angular jhiTranslate - How to Implement Dynamic Translations with jhiTranslate JHipster in Angular?
I'm working on an Angular project and I want to implement a dynamic translation using jhiTranslate and JHipster. I have a text that contains two dynamic values that need to be displayed. Here's what I'...