Zephora UI

மொழியாக்கம்

உள்ளமைந்த ஒவ்வொரு UI சரமும் (மூடும் பட்டன்கள், pagination லேபிள்கள், வரிசைப்படுத்தல் அறிவிப்புகள், பதிவேற்ற தூண்டல்கள்…) locale registry வழியாகத் தீர்க்கப்படுகிறது. bundle-இல் en மட்டுமே உட்பொதிக்கப்பட்டுள்ளது — மற்ற ஒவ்வொரு மொழியும் வெளியிலிருந்து (இறக்குமதி செய்யக்கூடிய module அல்லது JSON கோப்பு) ஏற்றப்பட்டு, addLocale மூலம் பதிவு செய்யப்படுகிறது. அதே registry @zephora/react-ஐயும் @zephora/native-ஐயும் இயக்குகிறது. en, tr.

ஒரு locale-ஐ ஏற்றுதல்

// 1) As a module (tree-shaken, typed):
import { addLocale } from "@zephora/react";
import { trLocale } from "@zephora/theme/locales/tr";
addLocale("tr", trLocale);

// 2) As JSON over the network (e.g. from your CDN):
const messages = await fetch("/locales/tr.json").then((r) => r.json());
addLocale("tr", messages);
// JSON dosyası pakette hazır: @zephora/theme/locales/tr.json

நேரலை டெமோ

locale-ஐ மாற்றுங்கள் — pagination லேபிள்களும் dialog பட்டன்களும் உடனடியாக புதுப்பிக்கப்படும்.

ஒரு locale-ஐத் தேர்ந்தெடுத்தல்

// Web
<ZephoraConfigProvider locale="tr">...</ZephoraConfigProvider>

// React Native
<ZephoraProvider theme={lightTheme} locale="tr">...</ZephoraProvider>

தனிப்பயன் locale-ஐப் பதிவு செய்தல்

addLocale உங்கள் செய்திகளை ஆங்கிலத்தின் மேல் இணைக்கிறது, எனவே பகுதி வரையறைகள் பாதுகாப்பானவை. updateLocale ஏற்கனவே உள்ள ஒன்றைத் திருத்துகிறது.

import { addLocale, updateLocale } from "@zephora/react";

addLocale("de", {
  intlLocale: "de",
  firstDayOfWeek: 1,
  close: "Schließen",
  cancel: "Abbrechen",
  confirm: "Bestätigen",
  loading: "Wird geladen…",
  pageOf: "Seite {page} von {count}",
});

updateLocale("de", { clear: "Leeren" });

உங்கள் சொந்த காம்பொனென்ட்களில் சரங்களைப் படித்தல்

import { useLocale, localeOption } from "@zephora/react";

function SaveBar() {
  const { t } = useLocale();
  return <Button>{t("apply")}</Button>;
}

// Outside React:
localeOption("cancel", "tr"); // "İptal"

கிடைக்கும் locale-கள்

48 தயாராக வரும் மொழிபெயர்ப்புகளுடன் வழங்கப்படுகிறது. ஒவ்வொன்றும் ஒரு சுயாதீன module — உங்களுக்குத் தேவையானதை மட்டும் இறக்குமதி செய்யுங்கள் (அல்லது பொருந்தும் .json-ஐ fetch செய்யுங்கள்).

கோட்மொழிஇறக்குமதி பாதை
arالعربية (Arabic)@zephora/theme/locales/ar
azAzərbaycanca (Azerbaijani)@zephora/theme/locales/az
bgБългарски (Bulgarian)@zephora/theme/locales/bg
bnবাংলা (Bengali)@zephora/theme/locales/bn
caCatalà (Catalan)@zephora/theme/locales/ca
csČeština (Czech)@zephora/theme/locales/cs
daDansk (Danish)@zephora/theme/locales/da
deDeutsch (German)@zephora/theme/locales/de
elΕλληνικά (Greek)@zephora/theme/locales/el
esEspañol (Spanish)@zephora/theme/locales/es
etEesti (Estonian)@zephora/theme/locales/et
faفارسی (Persian)@zephora/theme/locales/fa
fiSuomi (Finnish)@zephora/theme/locales/fi
frFrançais (French)@zephora/theme/locales/fr
heעברית (Hebrew)@zephora/theme/locales/he
hiहिन्दी (Hindi)@zephora/theme/locales/hi
hrHrvatski (Croatian)@zephora/theme/locales/hr
huMagyar (Hungarian)@zephora/theme/locales/hu
hyՀայերեն (Armenian)@zephora/theme/locales/hy
idBahasa Indonesia (Indonesian)@zephora/theme/locales/id
isÍslenska (Icelandic)@zephora/theme/locales/is
itItaliano (Italian)@zephora/theme/locales/it
ja日本語 (Japanese)@zephora/theme/locales/ja
kaქართული (Georgian)@zephora/theme/locales/ka
kkҚазақша (Kazakh)@zephora/theme/locales/kk
ko한국어 (Korean)@zephora/theme/locales/ko
ltLietuvių (Lithuanian)@zephora/theme/locales/lt
lvLatviešu (Latvian)@zephora/theme/locales/lv
msBahasa Melayu (Malay)@zephora/theme/locales/ms
nlNederlands (Dutch)@zephora/theme/locales/nl
noNorsk bokmål (Norwegian)@zephora/theme/locales/no
plPolski (Polish)@zephora/theme/locales/pl
ptPortuguês (Portuguese)@zephora/theme/locales/pt
pt-brPortuguês do Brasil (Brazilian Portuguese)@zephora/theme/locales/pt-br
roRomână (Romanian)@zephora/theme/locales/ro
ruРусский (Russian)@zephora/theme/locales/ru
skSlovenčina (Slovak)@zephora/theme/locales/sk
slSlovenščina (Slovenian)@zephora/theme/locales/sl
srSrpski (Serbian)@zephora/theme/locales/sr
svSvenska (Swedish)@zephora/theme/locales/sv
swKiswahili (Swahili)@zephora/theme/locales/sw
taதமிழ் (Tamil)@zephora/theme/locales/ta
thไทย (Thai)@zephora/theme/locales/th
trTürkçe (Turkish)@zephora/theme/locales/tr
ukУкраїнська (Ukrainian)@zephora/theme/locales/uk
viTiếng Việt (Vietnamese)@zephora/theme/locales/vi
zh-cn简体中文 (Simplified Chinese)@zephora/theme/locales/zh-cn
zh-tw繁體中文 (Traditional Chinese)@zephora/theme/locales/zh-tw

செய்தி குறிப்பு

முழு key தொகுப்பும் ZephoraLocale type-இல் உள்ளது — செயல்கள் (close, cancel, confirm, clear…), தரவு நிலைகள் (loading, noData, emptyMessage), படிவ சரங்கள் (showPassword, browseFiles, removeFile), வழிசெலுத்தல் (pageOf, nextPage, breadcrumb), தரவுக் காட்சி (sortAscending, selectAllRows, goToSlide) மற்றும் தேதிகள் (prevMonth, chooseDate, firstDayOfWeek, intlLocale). Placeholder-கள் t(key, params) மூலம் interpolate செய்யப்படும் {param} தொடரியலைப் பயன்படுத்துகின்றன.