···238238 - This is applied with the `<meta>` tag on the client-side.
239239 - The policy can also be set with `Referrer-Policy` header configured on the server-side (not this variable).
240240 - Note that since Phanpy uses hash-based URLs, the referrer does not include the hash part.
241241-- `PHANPY_LINGVA_INSTANCES` (optional, space-separated list, default: `lingva.phanpy.social [...hard-coded list of fallback instances]`):
241241+- `PHANPY_LINGVA_INSTANCES` (**DEPRECATED**, optional, space-separated list, default: `lingva.phanpy.social [...hard-coded list of fallback instances]`):
242242 - Specify a space-separated list of instances. First will be used as default before falling back to the subsequent instances. If there's only 1 instance, means no fallback.
243243 - May specify a self-hosted Lingva instance, powered by either [lingva-translate](https://github.com/thedaviddelta/lingva-translate) or [lingva-api](https://github.com/cheeaun/lingva-api)
244244 - List of fallback instances hard-coded in `/.env`
245245 - [↗️ List of lingva-translate instances](https://github.com/thedaviddelta/lingva-translate?tab=readme-ov-file#instances)
246246+- `PHANPY_TRANSLANG_INSTANCES` (optional, space-separated list, default: `translang.phanpy.social`):
247247+ - Specify a space-separated list of instances. First will be used as default before falling back to the subsequent instances. If there's only 1 instance, means no fallback.
248248+ - May specify a self-hosted Translating instance, powered by [translang-api](https://github.com/cheeaun/translang-api).
249249+ - List of instances hard-coded in `/.env`
246250- `PHANPY_IMG_ALT_API_URL` (optional, no defaults):
247251 - API endpoint for self-hosted instance of [img-alt-api](https://github.com/cheeaun/img-alt-api).
248252 - If provided, a setting will appear for users to enable the image description generator in the composer. Disabled by default.
···11-import translationTargetLanguages from '../data/lingva-target-languages';
11+import languages from '../data/translang-languages';
2233import localeMatch from './locale-match';
44import mem from './mem';
55import states from './states';
66+77+const translationTargetLanguages = Object.entries(languages).map(
88+ ([code, { name }]) => ({
99+ code,
1010+ name,
1111+ }),
1212+);
613714const locales = mem(() => [
815 new Intl.DateTimeFormat().resolvedOptions().locale,
+4
src/utils/localeCode2Text.js
···11import { i18n } from '@lingui/core';
2233+import translangLanguagesNative from '../data/translang-languages-native';
44+35import mem from './mem';
4657// Some codes are not supported by Intl.DisplayNames
···2830 if (!fallback) {
2931 const anotherText = IntlDN(code).of(code);
3032 if (anotherText !== code) return anotherText;
3333+ const yetAnotherText = translangLanguagesNative?.[locale];
3434+ if (yetAnotherText !== code) return yetAnotherText;
3135 }
3236 return fallback || '';
3337 } catch (e) {