Skip to main content
Login

Sign in to access your account

Internationalization - National Design System

NDS's own words in the page's language, from markers in the markup and one pack per language that a site can change or extend

Overview

NDS writes its own words in the page’s language: button labels, screen reader labels, error messages, month names. Each NDS word in a canon carries a data-i18n marker, and NDS writes it from the pack of the page’s language. The words a script writes come from the same pack.

A pack is one JSON file per language, such as assets/i18n/ar.json. English needs none: it is in the markup and the scripts, so an English page loads no pack. The page picks the language with lang on <html>, and NDS loads the pack when its scripts start. Your own words carry no marker and are never translated: write them in the page’s language.

Pick another component when:

  • you need to show a date in the page’s language: Date

Usage

Set the language on <html>. The base language names the file: ar-SA loads ar.json.

<html lang="ar" dir="rtl">

Each NDS word in a canon names its section and key in a marker. Keep the markers when you copy a canon: NDS writes those words in the page’s language. data-i18n marks an element’s text, and data-i18n-aria-label and its siblings mark an attribute.

<button type="button" class="nds-close nds-modal-close nds-btn nds-subtle nds-icon-only" aria-label="Close" data-i18n-aria-label="modal.close"> <i class="nds-icon nds-hgi-cancel-01" aria-hidden="true"></i> </button>

Change a few texts with window.NDS_I18N_LANGS, in <head> before the NDS scripts. Put each text under its language, and name it by its section and key from the Word List. The keys you leave out keep the pack’s text.

<head> <script> window.NDS_I18N_LANGS = Object.assign(window.NDS_I18N_LANGS || {}, { ar: { validation: { required: 'يرجى تعبئة هذا الحقل' }, pagination: { prev: 'السابق', next: 'التالي' } } }); </script> </head>

window.NDS_I18N takes the same sections with no language, and each text it sets shows in every language. Use it only on a site that has one language.

Add a language NDS does not ship, such as French: copy the words of assets/i18n/en.json, which holds every NDS word in English, and translate them. Put them in window.NDS_I18N_LANGS.fr, in a script file of your own that every page loads before the NDS scripts. The words you leave out show in English. Never add a file to assets/i18n/: an NDS update replaces that folder.

// site-i18n.js, on every page window.NDS_I18N_LANGS = Object.assign(window.NDS_I18N_LANGS || {}, { fr: { validation: { required: 'Ce champ est obligatoire', select_at_least: { one: 'Choisissez au moins 1 option', other: 'Choisissez au moins {n} options' } }, pagination: { prev: 'Page précédente', next: 'Page suivante', page: 'Page {n}' } } });

Each language can sit in a file of its own: each file adds its language with Object.assign, as above. To split one language over several files, add each file’s sections to that language. Each file sets whole sections: two files that set validation for the same language replace one another.

// ar-forms.js. ar-pagination.js does the same with its sections window.NDS_I18N_LANGS = window.NDS_I18N_LANGS || {}; window.NDS_I18N_LANGS.ar = Object.assign(window.NDS_I18N_LANGS.ar || {}, { validation: { required: 'يرجى تعبئة هذا الحقل' } });

Give your own component its text with NDS.i18n.getStrings(). Its English goes in the call. Each other language goes in window.NDS_I18N_LANGS, under the language and your component’s name.

const strings = NDS.i18n.getStrings('booking', { title: 'Book a visit', seats: { one: '{n} seat left', other: '{n} seats left' } }); heading.textContent = strings.text('title'); // set() writes the text again once the language file is in strings.set(counter, 'text', 'seats', { n: 3 });

Word List

Every word in the pack, by section and key, with its English and its Arabic. Each section is named after the component that reads it. weather holds the words of Weather, and date holds the Hijri month names and the long date format of Date. Change any word with window.NDS_I18N_LANGS. The same English words are in one file, assets/i18n/en.json, for you to translate.

Showing 1–25 of 402 words
Key and EnglishArabic
accessibility.panel_title
Accessibility Tools
أدوات إمكانية الوصول
accessibility.panel_label
Accessibility settings
إعدادات إمكانية الوصول
accessibility.close_panel
Close accessibility panel
إغلاق لوحة إمكانية الوصول
accessibility.toggle_theme
Toggle theme
تبديل المظهر
accessibility.scroll_panel
Scroll panel
تمرير اللوحة
accessibility.section_modes
Accessibility Modes
أوضاع إمكانية الوصول
accessibility.section_readable
Readable Experience
تجربة القراءة
accessibility.section_visual
Visually Pleasing Experience
التجربة البصرية
accessibility.aria_readable
Readable experience controls
عناصر تحكم تجربة القراءة
accessibility.aria_visual
Visual adjustments
التعديلات البصرية
accessibility.default
Default
افتراضي
accessibility.font_sizing
Font Sizing
حجم الخط
accessibility.dyslexia
Dyslexia Friendly
داعم لعسر القراءة
accessibility.highlight_titles
Highlight Titles
تمييز العناوين
accessibility.highlight_links
Highlight Links
تمييز الروابط
accessibility.reading_mask
Reading Mask
مجهر القراءة
accessibility.pause_motion
Pause Motion
إيقاف الحركة
accessibility.text_align
Text Alignment
محاذاة النص
accessibility.line_height
Line Height
ارتفاع السطر
accessibility.letter_spacing
Letter Spacing
تباعد الحروف
accessibility.word_spacing
Word Spacing
تباعد الكلمات
accessibility.reset
Reset Settings
إعادة تعيين الإعدادات
accessibility.mode_epilepsy_safe
Epilepsy Safe Mode
وضع مراعٍ للصرع
accessibility.mode_epilepsy_safe_desc
Stops motion and dampens color intensity
يوقف الحركة ويخفّف حدة الألوان
accessibility.mode_visually_impaired
Visually Impaired Mode
وضع ذوي الإعاقة البصرية
accessibility.mode_visually_impaired_desc
Enlarges text and boosts contrast for clearer reading
يكبّر الخط ويعزّز التباين لقراءة أوضح
accessibility.mode_cognitive_disability
Cognitive Disability Mode
وضع داعم للإعاقة المعرفية
accessibility.mode_cognitive_disability_desc
Highlights titles and stops motion to reduce distraction
يبرز العناوين ويوقف الحركة لتقليل الإلهاء
accessibility.mode_motor_impaired
Motor Impaired Mode
وضع ذوي الإعاقة الحركية
accessibility.mode_motor_impaired_desc
Enlarges click targets
يكبّر مناطق النقر
accessibility.mode_colorblind
Colorblind Mode
وضع عمى الألوان
accessibility.mode_colorblind_desc
Adjusts colors to distinguish red and green clearly
يضبط الألوان لتمييز الأحمر والأخضر بوضوح
accessibility.mode_dyslexia_friendly
Dyslexia Friendly Mode
وضع داعم لعسر القراءة
accessibility.mode_dyslexia_friendly_desc
Uses a clearer font and widens line and word spacing
يستخدم خطًا أوضح ويوسّع تباعد الأسطر والكلمات
accessibility.mode_adhd_friendly
ADHD Friendly Mode
وضع داعم لاضطراب فرط الحركة وتشتت الانتباه
accessibility.mode_adhd_friendly_desc
Stops motion, highlights titles, and enables the reading mask
يوقف الحركة ويبرز العناوين مع مجهر القراءة
accessibility.visual_boost_contrast
Boost Contrast
تعزيز التباين
accessibility.visual_monochrome
Monochrome
أحادي اللون
accessibility.visual_high_contrast
High Contrast
تباين عالٍ
accessibility.visual_high_saturation
High Saturation
تشبع عالٍ
accessibility.visual_low_saturation
Low Saturation
تشبع منخفض
accessibility.visual_cvd_deutan
Deuteranopia
عمى اللون الأخضر
accessibility.on
on
مفعل
accessibility.off
off
معطل
accessibility.set
set to
تم الضبط على
accessibility.reset_announce
All accessibility settings reset to default.
تمت إعادة تعيين جميع إعدادات إمكانية الوصول إلى الافتراضي.
accessibility.reset_done
Settings reset
تمت إعادة التعيين
accessibility.active
active
نشط
accessibility.confirm_reset
Click again to confirm
انقر مرة أخرى للتأكيد
accessibility.confirm_reset_msg
Press the reset button again to confirm.
اضغط زر إعادة التعيين مرة أخرى للتأكيد.
accessibility.confirm_reset_remaining
one: Confirm reset within 1 second. · other: Confirm reset within {n} seconds.
one: أكّد إعادة التعيين خلال ثانية واحدة. · two: أكّد إعادة التعيين خلال ثانيتين. · few: أكّد إعادة التعيين خلال {n} ثوانٍ. · many: أكّد إعادة التعيين خلال {n} ثانية. · other: أكّد إعادة التعيين خلال {n} ثانية.
accessibility.reset_cancelled
Reset cancelled.
تم إلغاء إعادة التعيين.
accessibility.start
Start
البداية
accessibility.end
End
النهاية
accessibility.justify
Justify
مضبوط
accessibility.small
Small
صغير
accessibility.medium
Medium
متوسط
accessibility.large
Large
كبير
accessibility.mask_toolbar
Reading mask controls
عناصر تحكم مجهر القراءة
accessibility.mask_size_down
Decrease mask band
تصغير شريط المجهر
accessibility.mask_size_up
Increase mask band
تكبير شريط المجهر
accessibility.mask_grab
Drag mask vertically. Use arrow keys to nudge.
اسحب المجهر رأسيًا. استخدم مفاتيح الأسهم لتحريكه.
accessibility.mask_close
Close reading mask
إغلاق مجهر القراءة
alert.close
Close
إغلاق
alert.close_alert
Close alert
إغلاق التنبيه
autocomplete.no_results
No results
لا توجد نتائج
autocomplete.load_failed
Could not load suggestions
تعذر تحميل الاقتراحات
autocomplete.pick_suggestion
Choose from the suggestions
اختر من الاقتراحات
breadcrumb.more
More
المزيد
breadcrumb.breadcrumb
Breadcrumb
مسار التنقل
calendar.events
one: 1 event · other: {n} events
one: فعالية واحدة · two: فعاليتان · few: {n} فعاليات · many: {n} فعالية · other: {n} فعالية
calendar.day_empty
No events on this day
لا توجد فعاليات في هذا اليوم
calendar.previous_week
Previous week
الأسبوع السابق
calendar.next_week
Next week
الأسبوع القادم
calendar.this_week
This week
هذا الأسبوع
calendar.last_week
Last week
الأسبوع الماضي
calendar.previous_month
Previous month
الشهر السابق
calendar.next_month
Next month
الشهر التالي
calendar.today
Today
اليوم
calendar.grid
Grid
شبكة
calendar.rows
Rows
صفوف
calendar.month
Month
شهر
calendar.days
Days
الأيام
calendar.show_all
Show all events
عرض كل الفعاليات
chart.chart
Chart
رسم بياني
chart.bar
Bar chart
رسم بياني بالأعمدة
chart.line
Line chart
رسم بياني خطي
code.code_language
Code language
لغة الشيفرة
cookies.panel_label
Cookie settings
إعدادات ملفات تعريف الارتباط
cookies.title
Cookies
ملفات تعريف الارتباط
cookies.description
This site uses cookies to make it easy to use and to improve your experience. If you continue to browse, you accept the Terms and Conditions of this site and its use of cookies.
يستخدم هذا الموقع ملفات تعريف الارتباط لتسهيل استخدامه وتحسين تجربتك. باستمرارك في التصفح، فإنك توافق على استخدامها.
cookies.accept
Accept
قبول
cookies.reject
Reject
رفض
cookies.manage
Manage
إدارة
cookies.close
Close
إغلاق
cookies.scroll_panel
Scroll panel
تمرير اللوحة
cookies.manage_title
Manage Cookies
إدارة ملفات تعريف الارتباط
cookies.manage_description
This site stores cookies on your browser. They are mostly used to make the site work as you expect. They do not usually identify you. You can turn off some types below, but parts of the site and its services may then not work.
يخزّن هذا الموقع ملفات تعريف الارتباط على متصفحك، وتستخدم غالبًا ليعمل الموقع كما تتوقع. لا تعرّف هذه الملفات بك عادةً. يمكنك إيقاف بعض أنواعها أدناه، لكن قد لا تعمل بعض أجزاء الموقع أو خدماته بعدها.
cookies.types
Cookie types
أنواع ملفات تعريف الارتباط
cookies.necessary
Necessary Cookies
ملفات تعريف الارتباط الضرورية
cookies.necessary_info
Always active
نشطة دائمًا
cookies.performance
Performance Cookies
ملفات تعريف الارتباط الخاصة بالأداء
cookies.functional
Functional Cookies
ملفات تعريف الارتباط الوظيفية
cookies.targeting
Targeting Cookies
ملفات تعريف الارتباط المستهدفة
cookies.confirm
Confirm My Choices
تأكيد اختياراتي
cookies.reject_all
Reject All
رفض الكل
cookies.done_title
Thank you!
شكرًا لك!
cookies.done
Your choice is saved. To change it, select Undo.
تم حفظ اختيارك. لتغييره، اختر «تراجع».
cookies.undo
Undo
تراجع
copy.copied
Copied
تم النسخ
copy.copy_code
Copy code
نسخ الشيفرة
custom-select.select_option
Please select an option
يرجى اختيار خيار
date.hijri_months
Muharram · Safar · Rabi al-Awwal · Rabi al-Thani · Jumada al-Ula · Jumada al-Akhirah · Rajab · Shaban · Ramadan · Shawwal · Dhu al-Qadah · Dhu al-Hijjah
محرم · صفر · ربيع الأول · ربيع الثاني · جمادى الأولى · جمادى الآخرة · رجب · شعبان · رمضان · شوال · ذو القعدة · ذو الحجة
date.hijri_era
AH
هـ
date.long_format
MMMM D, YYYY
D MMMM YYYY
date-picker.select_month
Select month
اختيار الشهر
date-picker.select_year
Select year
اختيار السنة
date-picker.prev_month
Previous month
الشهر السابق
date-picker.next_month
Next month
الشهر التالي
date-picker.today
Today
اليوم
date-picker.close
Close
إغلاق
date-picker.clear
Clear
مسح
date-picker.save
Save
حفظ
date-picker.invalid
Invalid date — expected format {format}
تاريخ غير صالح — الصيغة المطلوبة {format}
date-picker.before_min
Earliest allowed date is {date}
أبكر تاريخ مسموح به {date}
date-picker.after_max
Latest allowed date is {date}
آخر تاريخ مسموح به {date}
date-picker.unavailable
{date} is not available. Pick another day
{date} غير متاح. اختر يومًا آخر
date-picker.range_order
Start date must come before end date
تاريخ البداية يجب أن يسبق تاريخ النهاية
date-picker.converted_hijri
Converted from the Hijri date {date}
حُوِّل من التاريخ الهجري {date}
date-picker.converted_gregory
Converted from the Gregorian date {date}
حُوِّل من التاريخ الميلادي {date}
date-picker.open_calendar
Open calendar
فتح التقويم
digital-stamp.tab
A government website registered with the Digital Government Authority.
موقع إلكتروني حكومي مسجل لدى هيئة الحكومة الرقمية.
digital-stamp.tab_short
Government website registered with DGA
موقع حكومي مسجل لدى هيئة الحكومة الرقمية
digital-stamp.verify
How you know?
كيف تتحقق؟
digital-stamp.label
Digital government stamp
ختم الحكومة الرقمية
digital-stamp.flag
Saudi Arabia flag
علم المملكة العربية السعودية
digital-stamp.dga
Digital Government Authority
هيئة الحكومة الرقمية
digital-stamp.register
Registered on Digital Government Authority:
مسجل لدى هيئة الحكومة الرقمية برقم:
digital-stamp.https_title
Official Reliable websites use
المواقع الإلكترونية الحكومية الموثوقة تستخدم بروتوكول
digital-stamp.https_desc
Ensure the website is using the HTTPS protocol.
تحقق من أن الموقع يستخدم بروتوكول HTTPS
digital-stamp.gov_title
Official Saudi Government websites URL ends with
روابط المواقع الإلكترونية الرسمية الحكومية تنتهي بـ
digital-stamp.gov_mark
.gov.sa
gov.sa
digital-stamp.gov_desc
Website belongs to an official government organization in the Kingdom of Saudi Arabia always ends with .gov.sa .
جميع روابط المواقع الرسمية التابعة للجهات الحكومية في المملكة العربية السعودية تنتهي بـ .gov.sa
digital-stamp.edu_title
Official Saudi educational websites URL ends with
روابط المواقع الإلكترونية الرسمية التعليمية السعودية تنتهي بـ
digital-stamp.edu_mark
.edu.sa
edu.sa
digital-stamp.edu_desc
Website belongs to an official educational in the Kingdom of Saudi Arabia always ends with .edu.sa or sch.sa .
جميع روابط المواقع الرسمية التعليمية في المملكة العربية السعودية تنتهي بـ sch.sa أو edu.sa
digital-stamp.sch_title
Official Saudi educational websites URL ends with
روابط المواقع الإلكترونية الرسمية التعليمية السعودية تنتهي بـ
digital-stamp.sch_mark
.sch.sa
sch.sa
digital-stamp.sch_desc
Website belongs to an official educational in the Kingdom of Saudi Arabia always ends with .edu.sa or sch.sa .
جميع روابط المواقع الرسمية التعليمية في المملكة العربية السعودية تنتهي بـ sch.sa أو edu.sa
digital-stamp.med_title
Official Saudi medical websites URL ends with
روابط المواقع الإلكترونية الرسمية الطبية السعودية تنتهي بـ
digital-stamp.med_mark
.med.sa
med.sa
digital-stamp.med_desc
Website belongs to an official medical in the Kingdom of Saudi Arabia always ends with .med.sa .
جميع روابط المواقع الرسمية الطبية في المملكة العربية السعودية تنتهي بـ med.sa
digital-stamp.org_title
Official Saudi non-profit organizations websites URL ends with
روابط المواقع الإلكترونية الرسمية للمؤسسات غير الربحية السعودية تنتهي بـ
digital-stamp.org_mark
.org.sa
org.sa
digital-stamp.org_desc
Website belongs to an official non-profit organizations in the Kingdom of Saudi Arabia always ends with .org.sa .
جميع روابط المواقع الرسمية للمؤسسات غير الربحية في المملكة العربية السعودية تنتهي بـ org.sa
digital-stamp.sa_title
Official Saudi activities and initiatives websites URL ends with
روابط المواقع الإلكترونية الرسمية للأنشطة والمبادرات السعودية تنتهي بـ
digital-stamp.sa_mark
.sa
.sa
digital-stamp.sa_desc
Website belongs to an official activities and initiatives in the Kingdom of Saudi Arabia always ends with .sa .
جميع روابط المواقع الرسمية للأنشطة والمبادرات في المملكة العربية السعودية تنتهي بـ .sa
drawer.search
Search the menu
البحث في القائمة
drawer.search_placeholder
Search…
بحث…
drawer.clear_search
Clear search
مسح البحث
drawer.no_results
No results
لا توجد نتائج
dropmenu.search
Search items
البحث في العناصر
dropmenu.search_placeholder
Search…
بحث…
dropmenu.clear_search
Clear search
مسح البحث
dropmenu.no_results
No results
لا توجد نتائج
dropmenu.select_option
Please select an option
يرجى اختيار خيار
editor.undo
Undo
تراجع
editor.redo
Redo
إعادة
editor.clear
Clear formatting
مسح التنسيق
editor.remove
Remove component
إزالة المكون
editor.bold
Bold
غامق
editor.italic
Italic
مائل
editor.underline
Underline
تسطير
editor.strike
Strikethrough
يتوسطه خط
editor.link
Insert link
إدراج رابط
editor.image
Insert image
إدراج صورة
editor.h1
Heading 1
عنوان 1
editor.h2
Heading 2
عنوان 2
editor.h3
Heading 3
عنوان 3
editor.h4
Heading 4
عنوان 4
editor.ul
Bulleted list
قائمة نقطية
editor.ol
Numbered list
قائمة رقمية
editor.align-left
Align left
محاذاة لليسار
editor.align-center
Align center
توسيط
editor.align-right
Align right
محاذاة لليمين
editor.align-justify
Justify
ضبط
editor.dir-ltr
Left to right
من اليسار إلى اليمين
editor.dir-rtl
Right to left
من اليمين إلى اليسار
editor.source
View HTML source
عرض مصدر HTML
editor.url
URL
الرابط
editor.text
Text
النص
editor.external
Open in new tab
فتح في تبويب جديد
editor.colored
Colored link
رابط ملون
editor.no_badge
Hide external badge
إخفاء شارة الرابط الخارجي
editor.from_link
From link
من رابط
editor.or
OR
أو
editor.attrs
Attributes
الخصائص
editor.invalid_image_url
Enter a valid image URL
أدخل رابط صورة صالحًا
editor.invalid_url
Enter a valid URL
أدخل رابطًا صالحًا
editor.upload_pending
Wait for the upload to finish
انتظر حتى يكتمل الرفع
editor.upload_failed
The file was not uploaded. Choose another file or enter a link
لم يتم رفع الملف. اختر ملفًا آخر أو أدخل رابطًا
editor.paste_blocked
Pasting images is not available — use the image dialog
لصق الصور غير متاح — استخدم نافذة إدراج الصورة
editor.paste_clips_shell
Selection crosses a component — adjust it before pasting
التحديد يتجاوز حدود مكون — عدّل التحديد قبل اللصق
editor.alt
Alt text
النص البديل
editor.width
Width (px)
العرض (بكسل)
editor.height
Height (px)
الارتفاع (بكسل)
editor.upload
Upload image
رفع صورة
editor.cancel
Cancel
إلغاء
editor.insert
Insert
إدراج
editor.unlink
Unlink
إزالة الرابط
editor.remove_prompt
Remove the component:
إزالة المكون:
empty.message
No content to show
لا يوجد محتوى لعرضه
expandable.show_more
Show More
عرض المزيد
expandable.show_less
Show Less
عرض أقل
export.exported
one: Exported {n} row · other: Exported {n} rows
zero: لم يتم تصدير أي صف · one: تم تصدير صف واحد · two: تم تصدير صفين · few: تم تصدير {n} صفوف · many: تم تصدير {n} صفًا · other: تم تصدير {n} صف
export.export
Export
تصدير
filter.update_failed
Could not update results
تعذر تحديث النتائج
filter.update_failed_description
Something went wrong applying the filter. The results shown are unchanged.
حدث خطأ أثناء تطبيق التصفية. النتائج المعروضة لم تتغير.
filter.no_results
No results
لا توجد نتائج
filter.no_results_description
No item matches the current filters.
لا توجد نتائج لمعايير التصفية الحالية
filter.no_options
No options to filter by
لا توجد خيارات للتصفية
filter.clear
Clear filters
مسح التصفية
filter.all
All
الكل
filter.apply
Apply
تطبيق
filter.min
Minimum
الحد الأدنى
filter.max
Maximum
الحد الأقصى
filter.max_value
Maximum value
القيمة القصوى
filter.filter
Filter
تصفية
filter.reset
Reset
إعادة تعيين
filter.applied_filters
Applied Filters:
التصفيات المطبقة:
filter.search
Search
بحث
footer.site_footer
Site Footer
تذييل الموقع
footer.footer_navigation
Footer navigation
روابط التذييل
form.min_value
Minimum value is {n}
الحد الأدنى {n}
form.max_value
Maximum value is {n}
الحد الأقصى {n}
form.no_arabic
Arabic characters are not allowed
الأحرف العربية غير مسموح بها
form.loading
Loading
جارٍ التحميل
form.show_password
Show password
إظهار كلمة المرور
form.hide_password
Hide password
إخفاء كلمة المرور
form.clear_input
Clear input
مسح المدخل
form.clear_search
Clear search
مسح البحث
form.suggestions
Suggestions:
اقتراحات:
form.decrease_value
Decrease value
تقليل القيمة
form.increase_value
Increase value
زيادة القيمة
form.clear
Clear
مسح
formatted-input.invalid_national_id
Invalid national ID number
رقم الهوية غير صحيح
formatted-input.invalid_iban
Invalid IBAN
رقم الآيبان غير صحيح
formatted-input.invalid_vat
Invalid VAT number
الرقم الضريبي غير صحيح
formatted-input.incomplete
Incomplete value
القيمة غير مكتملة
formatted-input.invalid
Invalid value
القيمة غير صحيحة
ipv.viewerLabel
Image viewer
عارض الصور
ipv.zoomIn
Zoom in
تكبير
ipv.zoomOut
Zoom out
تصغير
ipv.resetZoom
Reset zoom
إعادة ضبط التكبير
ipv.toggleUI
Toggle controls
إظهار/إخفاء الأدوات
ipv.close
Close
إغلاق
ipv.prevImage
Previous image
الصورة السابقة
ipv.nextImage
Next image
الصورة التالية
ipv.instructionsTitle
Controls:
أزرار التحكم:
ipv.instructionsScroll
• Scroll to zoom
• مرّر للتكبير
ipv.instructionsDrag
• Drag to pan
• اسحب للتحريك
ipv.instructionsReset
• Double-click to reset
• النقر المزدوج لإعادة الضبط
ipv.instructionsNav
• Arrow keys to navigate
• أسهم لوحة المفاتيح للتنقل
ipv.instructionsToggle
• H key to toggle UI
• المفتاح H لإظهار/إخفاء الأدوات
ipv.instructionsClose
• ESC to close
• ESC للإغلاق
main-nav.primary_navigation
Primary navigation
التنقل الرئيسي
main-nav.toggle_menu
Toggle navigation menu
فتح/إغلاق قائمة التنقل
modal.close
Close
إغلاق
modal.close_dialog
Close dialog
إغلاق النافذة
multiselect.none
{label}: No selection
{label}: لا يوجد تحديد
multiselect.added
Added {value}
تمت إضافة {value}
multiselect.removed
Removed {value}
تمت إزالة {value}
multiselect.cleared
Selection cleared
تم مسح التحديد
multiselect.applied
Applied {value}
تم تطبيق {value}
multiselect.reset
Reset
إعادة تعيين
multiselect.apply
Apply
تطبيق
otp.digit
Digit {n} of {total}
الرقم {n} من {total}
otp.otp_incomplete
Please enter all {n} digits
يرجى إدخال جميع الأرقام
pagination.prev
Previous page
الصفحة السابقة
pagination.next
Next page
الصفحة التالية
pagination.page
Page {n}
الصفحة {n}
pagination.more
More pages
المزيد من الصفحات
pagination.jump
Jump to page
الانتقال إلى صفحة
pagination.pagination
Pagination
ترقيم الصفحات
panel.close_panel
Close panel
إغلاق اللوحة
panel.make_smaller
Make panel smaller
تصغير اللوحة
panel.make_larger
Make panel larger
تكبير اللوحة
password.mismatch
The two passwords do not match
كلمتا المرور غير متطابقتين
password.met
{n} of {total} password rules met
تم استيفاء {n} من {total} من شروط كلمة المرور
password.clear_password
Clear password
مسح كلمة المرور
radio.select_option
Please select an option
يرجى اختيار خيار
rating.stars
one: {n} star · other: {n} stars
zero: {n} نجمة · one: نجمة واحدة · two: نجمتان · few: {n} نجوم · many: {n} نجمة · other: {n} نجمة
rating.score
{n} of {total}
{n} من {total}
rating.rating_required
Please choose a rating
يرجى اختيار تقييم
rating.vote
Vote
تصويت
scroll-more.show_more
Show more
عرض المزيد
selection.select_all
Select all
تحديد الكل
selection.clear_all
Clear all
مسح الكل
session-timeout.warning_title
Your session is about to end
جلستك على وشك الانتهاء
session-timeout.warning_description
You have not used the page for a while. When the time runs out, you are signed out and lose any data you have not saved.
لم تستخدم الصفحة منذ مدة. عند انتهاء الوقت يتم تسجيل خروجك، وتفقد أي بيانات لم تحفظها.
session-timeout.stay
Stay signed in
البقاء متصلًا
session-timeout.sign_out
Sign out
تسجيل الخروج
session-timeout.ended_title
Your session has ended
انتهت جلستك
session-timeout.ended_description
You were signed out because the page was not used. Sign in again to continue.
تم تسجيل خروجك لعدم استخدام الصفحة. سجّل الدخول مرة أخرى للمتابعة.
session-timeout.sign_in
Sign in
تسجيل الدخول
share.share_page
Share Page
مشاركة الصفحة
share.share_on_x
Share on X
المشاركة على X
share.share_on_linkedin
Share on LinkedIn
المشاركة على لينكدإن
share.share_on_whatsapp
Share on WhatsApp
المشاركة على واتساب
share.copy_link
Copy Link
نسخ الرابط
share.more_options
More Options
خيارات أخرى
sidemenu.sidebar
Sidebar
الشريط الجانبي
sidemenu.sidebar_menu
Sidebar Menu
قائمة الشريط الجانبي
sort.sort
Sort
ترتيب
swiper.go_to_page
Go to page {n}
الانتقال إلى الصفحة {n}
swiper.pause_slides
Pause slides
إيقاف الشرائح مؤقتًا
swiper.previous_slide
Previous slide
الشريحة السابقة
swiper.next_slide
Next slide
الشريحة التالية
table.reset
Reset
إعادة تعيين
table.column
Column {n}
العمود {n}
table.columns
Columns
الأعمدة
table.visible_columns
Visible columns
الأعمدة المرئية
table.toggle_details
Toggle details
إظهار/إخفاء التفاصيل
taginput.added
Added {value}
تمت إضافة {value}
taginput.removed
Removed {value}
تمت إزالة {value}
taginput.editing
Editing {value}
تعديل {value}
taginput.duplicate
Already added
مضاف مسبقًا
taginput.max
Maximum limit {n}
الحد الأقصى {n}
taginput.cleared
All tags removed
تمت إزالة جميع الوسوم
taginput.strict
Choose from the suggestions
اختر من الاقتراحات
taginput.tag_required
Please add at least one tag
يرجى إضافة وسم واحد على الأقل
time-picker.hour
Hour
ساعة
time-picker.minute
Minute
دقيقة
time-picker.second
Second
ثانية
time-picker.meridiem
AM/PM
ص/م
time-picker.am
AM
ص
time-picker.pm
PM
م
time-picker.toggle
Pick a time
اختيار الوقت
time-picker.invalid
Invalid time — expected format {format}
وقت غير صالح — الصيغة المطلوبة {format}
time-picker.incomplete
Enter the hour and the minute
أدخل الساعة والدقيقة
time-picker.before_min
Earliest allowed time is {time}
أبكر وقت مسموح به {time}
time-picker.after_max
Latest allowed time is {time}
آخر وقت مسموح به {time}
time-picker.required
This field is required
هذا الحقل مطلوب
toc.on_this_page
On this page
في هذه الصفحة
toc.table_of_contents
Table of contents
جدول المحتويات
tooltip.more_info
More info
مزيد من المعلومات
topbar.toggle_dark_mode
Toggle dark mode
تبديل الوضع الداكن
topbar.top_bar_utilities
Top bar utilities
أدوات الشريط العلوي
topbar.choose_theme
Choose a theme
اختيار المظهر
upload.size_exceeds
File size exceeds {size}
حجم الملف يتجاوز {size}
upload.type_not_allowed
File type not allowed
نوع الملف غير مسموح
upload.type_not_allowed_ext
File type not allowed (.{ext})
نوع الملف غير مسموح (.{ext})
upload.max_files
Maximum number of files reached ({n})
تم الوصول إلى الحد الأقصى لعدد الملفات ({n})
upload.network_error
Network error
خطأ في الشبكة
upload.timed_out
Upload timed out
انتهت مهلة الرفع
upload.cancelled
Upload cancelled
تم إلغاء الرفع
upload.failed
Upload failed
فشل الرفع
upload.remove_file
Remove file
إزالة الملف
upload.file_required
Please add a file
يرجى إرفاق ملف
upload.upload_pending
Please wait for the upload to finish
يرجى الانتظار حتى يكتمل الرفع
upload.drag_drop
Drag and drop files here to upload
اسحب الملفات وأفلتها هنا للرفع
upload.browse_files
Browse Files
استعراض الملفات
user-feedback.success
Your feedback is submitted!
تم استلام ملاحظتك!
user-feedback.error
An error occurred, please try again
حدث خطأ، يرجى المحاولة مرة أخرى
validation.required
This field is required
هذا الحقل مطلوب
validation.invalid
Invalid input
مدخل غير صحيح
validation.invalid_email
Please enter a valid email address
يرجى إدخال عنوان بريد إلكتروني صحيح
validation.invalid_url
Please enter a valid URL
يرجى إدخال رابط صحيح
validation.pattern
Please use the correct format
يرجى استخدام الصيغة الصحيحة
validation.too_short
Input is too short (minimum {n} characters)
المدخل قصير جدًا (الحد الأدنى {n})
validation.too_long
Input is too long (maximum {n} characters)
المدخل طويل جدًا (الحد الأقصى {n})
validation.range_under
Value must be at least {n}
القيمة يجب أن تكون على الأقل {n}
validation.range_over
Value must be no more than {n}
القيمة يجب ألا تزيد على {n}
validation.select_at_least
one: Please select at least 1 option · other: Please select at least {n} options
one: يرجى اختيار خيار واحد على الأقل · two: يرجى اختيار خيارين على الأقل · few: يرجى اختيار {n} خيارات على الأقل · many: يرجى اختيار {n} خيارًا على الأقل · other: يرجى اختيار {n} خيار على الأقل
validation.select_at_most
one: Please select no more than 1 option · other: Please select no more than {n} options
one: يرجى اختيار خيار واحد كحد أقصى · two: يرجى اختيار خيارين كحد أقصى · few: يرجى اختيار {n} خيارات كحد أقصى · many: يرجى اختيار {n} خيارًا كحد أقصى · other: يرجى اختيار {n} خيار كحد أقصى
validation.still_loading
Still loading. Try again in a moment
جارٍ التحميل، يرجى المحاولة بعد قليل
voice-input.start
Start voice input ({language})
بدء الإدخال الصوتي ({language})
voice-input.stop
Stop voice input
إيقاف الإدخال الصوتي
voice-input.language
English
العربية
voice-input.no-speech
No speech detected
لم يتم اكتشاف صوت
voice-input.not-allowed
Microphone permission required
مطلوب إذن الميكروفون
voice-input.audio-capture
Microphone access denied
تم رفض الوصول للميكروفون
voice-input.network
Network error
خطأ في الشبكة
voice-input.aborted
Voice input cancelled
تم إلغاء الإدخال الصوتي
voice-input.language-not-supported
Language not supported
اللغة غير مدعومة
voice-input.default
Voice input error
خطأ في الإدخال الصوتي
voice-input.timeout
Voice input timed out
انتهت مهلة الإدخال الصوتي
voice-input.unsupported
Voice input is not supported in this browser
الإدخال الصوتي غير مدعوم في هذا المتصفح
voice-input.voice_input
Voice input
الإدخال الصوتي
voice-input.start_voice_input
Start voice input
بدء الإدخال الصوتي
weather.weather
{desc}, {temp}{unit}
{desc}، {temp}{unit}
weather.weather_city
· {desc}, {temp}{unit}
· {desc}، {temp}{unit}
weather.celsius
°C
°م
weather.fahrenheit
°F
°ف
weather.clear
Clear
صافي
weather.partly_cloudy
Partly Cloudy
غائم جزئيًا
weather.overcast
Overcast
غائم
weather.fog
Fog
ضباب
weather.rain
Rain
أمطار
weather.snow
Snow
ثلوج
weather.storm
Storm
عاصفة

Behavior

Lookup Order

NDS looks for each word in this order: your window.NDS_I18N_LANGS override for the language, your window.NDS_I18N override, the pack, then the English in the markup or the script. A marked word found nowhere keeps the word in the markup. A key a script asks for and finds nowhere shows its own name.

Pack Timing

NDS starts to load the pack of the page’s language as soon as its scripts run, once per page, and the browser caches it. The link carries the ?ver= of the NDS scripts, so a new release never shows the old text. An English page loads no pack, and a language with no pack shows the English.

The components in the bundles that load after the page shows start once the pack is in, so they write their text in the page’s language. They wait 3 seconds at most, then start anyway.

Skeleton

On a page that is not in English, each marked word shows a bar in its place until the pack is in, so the page never shows English first. Expandable Content’s Show More button and Empty’s message are two such words. A screen reader label is written again once the pack is in, unless something changed it since. If the NDS scripts never run, the bar goes after 4 seconds.

Plurals and Values

A value can name parts that the component fills in, such as {n} or {value}. A value can also be an object of plural forms: zero, one, two, few, many and other, picked by n with the plural rules of the language. Only other is required: a form the object lacks uses other. Arabic uses all six, English uses one and other.

Field Language

A Date Picker field with data-lang or lang writes its calendar in that language, not the page’s. NDS loads that language’s file when the field first needs it. A date-picker override in window.NDS_I18N_LANGS shows in the fields of its own language. One in window.NDS_I18N shows in that field too, whatever its language.

Language Change

Set lang and dir on <html> to change the page’s language with no reload. NDS loads the pack of the new language, then writes each marked word again. A word that a script or you changed stays as it is. NDS does not set dir: set it with lang.

The components that write their own words, such as Calendar, Countdown, Chart and File Upload, draw them again in the new language. Open menus, filters and form values stay as they are. A message that is already on screen, such as a field error, stays in the old language until it shows again.

A language library in a single-page app, such as vue-i18n or i18next, can set the two attributes: NDS needs no call of its own. Your own words change with your library. A server-rendered site loads the page again, for the words it writes itself.

Frameworks

Keep the markers in JSX and in Vue and Angular templates. NDS writes each word into the text node that the framework made, so a later render keeps the word. When a word changes with state, change its marker with it, such as data-i18n="expandable.show_less" on Show Less.

A morph, as in Livewire, Turbo or htmx, writes the server’s English back into the page. NDS.init.mount(root) after each morph translates it again, as it starts the components in it (see HTML Swaps). A framework that hydrates server HTML starts NDS after hydration: see Hydration.

NDS does not translate markers inside a shadow root.

Missing Pack

When the pack fails to load, the components show their English text. A failure other than a missing file logs [NDS.i18n] ar failed, with the page’s language in place of ar. NDS looks for the pack in the i18n/ folder beside the folder that holds nds-main.min.js. When your files sit somewhere else, set NDS_I18N_PATH.

Built-in Features

  • Words in the Markup

    Each NDS word in a canon carries a marker, so the markup you copy shows in the page's language with no script of your own.

  • Arabic and English

    Every component ships its text in both languages, its screen reader labels and messages included.

  • One File per Language

    All the text of a language is one request, so a page that has ten components loads one file, not ten. An English page loads none.

  • Key by Key Overrides

    window.NDS_I18N_LANGS changes only the keys you set, in the language you set them for. The rest of the component keeps its text in the page's language.

  • Any Language

    A language NDS does not ship needs no file and no change to the scripts: its words go in window.NDS_I18N_LANGS, and a word you leave out shows in English.

  • Plural Rules

    A count picks the right form for the language, such as «خيار واحد», «خيارين» and «11 خيارًا» in Arabic.

  • Month and Day Names

    The browser names the Gregorian months and the weekdays in the page's language. The Hijri month names come from the pack, since some Android browsers name them wrong.

  • Text Stays Text

    Components escape pack text before they put it in HTML, and a marker writes only text and text attributes. A value in the pack can never run as code.

Best Practices

  • Set lang and dir on <html> on every page. The pack follows lang, and the layout follows dir.
  • Keep the data-i18n markers in the markup you copy from a canon. NDS writes each marked word in the page’s language. Remove a marker only where you write your own word.
  • Never edit the NDS scripts to change their text. Their English is only a fallback, and an upgrade replaces it.
  • Use window.NDS_I18N_LANGS to change any text. Never edit assets/i18n/: an NDS update replaces it.
  • Set window.NDS_I18N_LANGS before the NDS scripts run, inline in <head> or in a script file that loads before them. A component that already wrote its text keeps the old text.
  • Put each override under its language in window.NDS_I18N_LANGS. A key in window.NDS_I18N replaces that text in every language, so use it only on a site that has one language.
  • Add to window.NDS_I18N_LANGS with Object.assign, as in the example. A plain window.NDS_I18N_LANGS = { … } drops the languages another script set.
  • Set each section of a language in one script only. A script that adds sections to a language another script set merges into it, as in the example: a plain { ar: { … } } replaces that language.
  • Run NDS.audit.run() after you write an override. It names a section or key that NDS does not have, which changes nothing.
  • To change one element’s text, use its own attribute where the component has one, such as data-empty-message or data-filter-all-label. The pack sets the text of every element.
  • Keep the {n}-style parts of a value when you translate it. A part you drop no longer shows its value.
  • Write your own markup in the page’s language.
  • Keep your own component’s text under its own name in window.NDS_I18N_LANGS, never in an NDS section.

API

Data Attributes

A marker names a word of the pack as section.key. NDS writes that word in the page’s language: on load, whenever marked markup joins the page, and when lang on <html> changes. A word that a script or you changed since stays as it is.

Attribute Element Effect
data-i18n="section.key" an element that holds only the word The word replaces the element’s text
data-i18n-aria-label, -aria-description, -title, -alt, -placeholder, -label an element that has that attribute The word goes in that attribute
data-i18n-vars='{"n":3}' an element with a marker Fills the {name} parts and picks the plural form of its markers’ words. Give it numbers and plain values only: a word or a formatted date in it stays in its old language
data-nds-i18n <html> NDS sets it once the page’s words are in

Configuration

Set these on window before the NDS scripts. The paths are not needed when the files sit in i18n/ beside the folder that holds nds-main.min.js. A language file on another origin needs CORS headers.

Global Default Effect
NDS_I18N_LANGS — Text by language, component and key, laid over the files: { ar: { validation: { required: '…' } } }
NDS_I18N — Text by component and key, in every language: { validation: { required: '…' } }. NDS_I18N_LANGS wins over it
NDS_I18N_PATH i18n/ in the assets/ folder the NDS scripts load from The folder the language files load from. End it with /. It wins over NDS_ASSETS_PATH
NDS_ASSETS_PATH the folder above the one that holds nds-main.min.js The assets/ folder. The language files load from its i18n/ folder, and the other bundles from its js/ folder

JavaScript

Method Effect
NDS.i18n.getStrings(component, defaults) Returns the text of one component, with defaults as its English. The methods below are on the object it returns
.text(key, vars, lang) Returns the text for key in the page’s language, with vars filled in. With lang, in that language: the first call loads its file
.set(element, attribute, key, vars) Writes the word in attribute ('text' is the element’s text). The six marker attributes and the text also get their marker, and vars goes in data-i18n-vars, so NDS keeps the word in the page language. Another attribute’s word is written again once the pack is in, unless it changed since
.load(lang) Returns a promise of the words, in the page’s language or lang
.ready(lang) Returns true once the text of that language is in
.has(key) Returns true when defaults has key. Use it for a key that comes from outside, such as a value from storage
NDS.i18n.load(component, lang) Returns a promise of a component’s words
NDS.i18n.translate(root) Writes the words of the markers in root now. NDS.init.mount() and refresh() call it
NDS.i18n.format(value, vars, lang) Fills {name} parts from vars, and picks a plural form by vars.n
NDS.i18n.pack() Returns a promise of the page language’s pack
NDS.i18n.resolveLang(lang) Returns lang, or the page’s language, as a base tag: ar-SA gives ar. A value that is not a language gives en
NDS.i18n.has(section, key) Returns true when a getStrings() call declared section, or key in it
NDS.i18n.isMissing(lang) Returns true when the file of lang, or of the page’s language, did not load. The components then show English
// A list that announces how many results it shows, in the page's language const strings = NDS.i18n.getStrings('results', { count: { one: '{n} result', other: '{n} results' } }); NDS.announce(strings.text('count', { n: rows.length }));

Events

Event Target Detail When
nds:language:change <html>, bubbles { lang } lang on <html> changed, the new pack is in, and the markers show its words. Draw again what your component formats itself, such as a date

The full API is in the banner of _js/nds-core.js, and in the comment above NDS.i18n there.

Last Modified Date: 04/11/2026 - 04:06 PM
Was this page useful?
60% of users said Yes from 2843 Feedbacks