seitime-frappe/frappe/geo/languages.csv
Sattam a88f2a8fc5
fix: prioritize English language selection for Guest user despite additional browser language settings
Description:
- Resolved an issue where the system incorrectly activated a non-English language for Guest users, even when English was the primary language in the browser settings.
- The bug occurred when additional languages (e.g., Arabic) were configured in the browser and one of those languages was already enabled in Frappe.
- Ensured that English is prioritized as the default language for Guest users when it is present in the browser language list, regardless of other enabled languages.
- Added a fix to explicitly enable English language for Guest users to prevent unintended language switching.

Steps to Reproduce:
- Create a new clean site and add additional languages (e.g., Arabic) in the browser settings.
- Ensure the additional language (e.g., Arabic) is already enabled in the database, which is by default.
- Observe that the system switches to the non-English translation (e.g., Arabic) for Guest users, even if English is the primary language in the browser settings.

Root Cause Analysis:
- Initially suspected `translate.py` was involved in language resolution.
- Checked enabled languages at the console using:
  `frappe.get_all("Language", filters={"enabled": 1}, pluck="name")`
  Result: ['fr', 'fa', 'es', 'de', 'ar']
- Identified that English was not enabled in the system, despite being a default requirement.
- Traced the issue to `languages.csv`, where English was not included among the enabled languages.

Fix:
- Enabled English in `languages.csv` to ensure it is included among the supported languages.
- This ensures English is chosen when included in the browser settings, resolving the issue.
2025-03-11 04:02:40 +03:00

1.6 KiB
Raw Blame History

1language_codelanguage_nameenabled
2afAfrikaans0
3amአማርኛ0
4arالعربية1
5bgБългарски0
6bnবাংলা0
7boབོད་སྐད་0
8bsBosanski0
9caCatalà0
10csČeština0
11daDansk0
12deDeutsch1
13elΕλληνικά0
14enEnglish1
15en-GBEnglish (United Kingdom)0
16en-USEnglish (United States)0
17eoIn-Context Translation0
18esEspañol1
19es-AREspañol (Argentina)0
20es-BOEspañol (Bolivia)0
21es-CLEspañol (Chile)0
22es-COEspañol (Colombia)0
23es-DOEspañol (República Dominicana)0
24es-ECEspañol (Ecuador)0
25es-GTEspañol (Guatemala)0
26es-MXEspañol (México)0
27es-NIEspañol (Nicaragua)0
28es-PEEspañol (Perú)0
29etEesti0
30faفارسی1
31fiSuomi0
32filFilipino0
33frFrançais1
34guગુજરાતી0
35heעברית0
36hiहिन्दी0
37hrHrvatski0
38huMagyar0
39idIndonesia0
40isÍslenska0
41itItaliano0
42ja日本語0
43kmខ្មែរ0
44knಕನ್ನಡ0
45ko한국어0
46kuKurdî0
47loລາວ0
48ltLietuvių0
49lvLatviešu0
50mkМакедонски0
51mlമലയാളം0
52mnМонгол0
53mrमराठी0
54msMelayu0
55myမြန်မာ0
56nlNederlands0
57noNorsk0
58plPolski0
59psپښتو0
60ptPortuguês0
61roRomână0
62ruРусский0
63rwKinyarwanda0
64siසිංහල0
65skSlovenčina0
66slSlovenščina0
67sqShqip0
68srСрпски0
69sr-BASrpski0
70svSvenska0
71swKiswahili0
72taதமிழ்0
73teతెలుగు0
74thไทย0
75trTürkçe0
76ukУкраїнська0
77urاردو0
78uzOZbek0
79viTiếng Việt0
80zh中文0
81zh-TW繁體中文0