Spaces:
Sleeping
Sleeping
| # Urdu (اردو) - Python Quick Reference | |
|  | |
|  | |
|  | |
|  | |
| > Write Python code in Urdu. This guide shows the Urdu keywords | |
| > to use for Legesher to understand your code. | |
| > | |
| > **Note:** This is a right-to-left (RTL) language. RTL support is currently a work in progress — we welcome your feedback! | |
| ## Language Details | |
| | Attribute | Value | | |
| | --------- | ----- | | |
| | **Language** | Urdu | | |
| | **Native Name** | اردو | | |
| | **Script** | Arabic | | |
| | **ISO 639-1** | `ur` | | |
| | **ISO 639-2** | `urd` | | |
| | **BCP 47 Tag** | `ur` | | |
| | **Text Direction** | Right-to-Left (RTL) | | |
| | **Status** | Experimental | | |
| ## Keywords (39 terms) | |
| These are Python's reserved words translated to Urdu. | |
| | English | Urdu | | |
| | ------- | ------ | | |
| | `and` | `اور` | | |
| | `as` | `بطور` | | |
| | `assert` | `تصدیق` | | |
| | `async` | `غیرہمزمان` | | |
| | `await` | `انتظار` | | |
| | `break` | `توڑ` | | |
| | `case` | `صورت` | | |
| | `class` | `جماعت` | | |
| | `continue` | `جاری` | | |
| | `def` | `تعریف` | | |
| | `del` | `مٹاؤ` | | |
| | `elif` | `ورنہاگر` | | |
| | `else` | `ورنہ` | | |
| | `except` | `سوائے` | | |
| | `except*` | `سوائے*` | | |
| | `False` | `غلط` | | |
| | `finally` | `بالآخر` | | |
| | `for` | `لیے` | | |
| | `from` | `سے` | | |
| | `global` | `عالمی` | | |
| | `if` | `اگر` | | |
| | `import` | `درآمد` | | |
| | `in` | `میں` | | |
| | `is` | `ہے` | | |
| | `lambda` | `لیمڈا` | | |
| | `match` | `مماثلت` | | |
| | `None` | `کچھنہیں` | | |
| | `nonlocal` | `غیرمقامی` | | |
| | `not` | `نہیں` | | |
| | `or` | `یا` | | |
| | `pass` | `گزر` | | |
| | `raise` | `اٹھاؤ` | | |
| | `return` | `واپسی` | | |
| | `True` | `صحیح` | | |
| | `try` | `کوشش` | | |
| | `type` | `نوعیت` | | |
| | `while` | `جبتک` | | |
| | `with` | `ساتھ` | | |
| | `yield` | `حاصل` | | |
| ## Built-in Functions (72 terms) | |
| Python's built-in functions and types in Urdu. | |
| | English | Urdu | | |
| | ------- | ------ | | |
| | `abs` | `مطلق` | | |
| | `aiter` | `غیرہمزمانتکرارکنندہ` | | |
| | `all` | `تمام` | | |
| | `anext` | `غیرہمزماناگلا` | | |
| | `any` | `کوئی` | | |
| | `ascii` | `آسکی` | | |
| | `bin` | `ثنائی` | | |
| | `bool` | `منطقی` | | |
| | `breakpoint` | `وقفہ` | | |
| | `bytearray` | `بائٹصف` | | |
| | `bytes` | `بائٹس` | | |
| | `callable` | `قابلِاستعمال` | | |
| | `chr` | `حرف` | | |
| | `classmethod` | `جماعتطریقہ` | | |
| | `compile` | `تالیف` | | |
| | `complex` | `مرکب` | | |
| | `delattr` | `خاصیت_مٹاؤ` | | |
| | `dict` | `لغت` | | |
| | `dir` | `فہرست` | | |
| | `divmod` | `تقسیمباقی` | | |
| | `ellipsis` | `حذف` | | |
| | `enumerate` | `شمار` | | |
| | `eval` | `جانچ` | | |
| | `exec` | `عمل` | | |
| | `filter` | `چھاننا` | | |
| | `float` | `اعشاری` | | |
| | `format` | `شکل` | | |
| | `frozenset` | `منجمدمجموعہ` | | |
| | `getattr` | `خاصیت_لاؤ` | | |
| | `globals` | `عالمیمتغیرات` | | |
| | `hasattr` | `خاصیت_ہے` | | |
| | `hash` | `ہیش` | | |
| | `help` | `مدد` | | |
| | `hex` | `سداسی` | | |
| | `id` | `شناخت` | | |
| | `input` | `داخلہ` | | |
| | `int` | `عددصحیح` | | |
| | `isinstance` | `مثال_ہے` | | |
| | `issubclass` | `ذیلی_جماعت_ہے` | | |
| | `iter` | `تکرارکنندہ` | | |
| | `len` | `لمبائی` | | |
| | `list` | `فہرستی` | | |
| | `locals` | `مقامیمتغیرات` | | |
| | `map` | `نقشہ` | | |
| | `max` | `زیادہ` | | |
| | `memoryview` | `یادداشتنظارہ` | | |
| | `min` | `کمترین` | | |
| | `next` | `اگلا` | | |
| | `notimplemented` | `غیرنافذ` | | |
| | `object` | `شے` | | |
| | `oct` | `ہشتی` | | |
| | `open` | `کھولو` | | |
| | `ord` | `ترتیب` | | |
| | `pow` | `قوت` | | |
| | `print` | `چھاپو` | | |
| | `property` | `خاصیت` | | |
| | `range` | `حدود` | | |
| | `repr` | `نمائندگی` | | |
| | `reversed` | `الٹا` | | |
| | `round` | `گول` | | |
| | `set` | `مجموعہ` | | |
| | `setattr` | `خاصیت_مقرر` | | |
| | `slice` | `ٹکڑا` | | |
| | `sorted` | `ترتیبشدہ` | | |
| | `staticmethod` | `جامدطریقہ` | | |
| | `str` | `متن` | | |
| | `sum` | `کل` | | |
| | `super` | `بالائی` | | |
| | `tuple` | `ٹپل` | | |
| | `type` | `نوعیت` | | |
| | `vars` | `متغیرات_لاؤ` | | |
| | `zip` | `جوڑا` | | |
| ## Exceptions (69 terms) | |
| Exception classes for error handling. | |
| | English | Urdu | | |
| | ------- | ------ | | |
| | `arithmeticerror` | `حسابیغلطی` | | |
| | `assertionerror` | `تصدیقغلطی` | | |
| | `attributeerror` | `خاصیتغلطی` | | |
| | `baseexception` | `بنیادیاستثنا` | | |
| | `baseexceptiongroup` | `بنیادیاستثناگروہ` | | |
| | `basegeneratorexit` | `بنیادیجنریٹرخروج` | | |
| | `blockingioerror` | `مسدودداخلہخارجہغلطی` | | |
| | `brokenpipeerror` | `ٹوٹاپائپغلطی` | | |
| | `buffererror` | `بفرغلطی` | | |
| | `byteswarning` | `بائٹسانتباہ` | | |
| | `childprocesserror` | `ذیلیعملغلطی` | | |
| | `connectionabortederror` | `رابطہمنسوخغلطی` | | |
| | `connectionerror` | `رابطہغلطی` | | |
| | `connectionrefusederror` | `رابطہمستردغلطی` | | |
| | `connectionreseterror` | `رابطہدوبارہغلطی` | | |
| | `deprecationwarning` | `متروکانتباہ` | | |
| | `encodingwarning` | `ضابطہبندیانتباہ` | | |
| | `environmenterror` | `ماحولغلطی` | | |
| | `eoferror` | `فائلختمغلطی` | | |
| | `exception` | `استثنا` | | |
| | `exceptiongroup` | `استثناگروہ` | | |
| | `fileexistserror` | `فائلموجودغلطی` | | |
| | `filenotfounderror` | `فائلنہملیغلطی` | | |
| | `floatingpointerror` | `اعشاریاشارہغلطی` | | |
| | `futurewarning` | `مستقبلانتباہ` | | |
| | `generatorexit` | `جنریٹرخروج` | | |
| | `importerror` | `درآمدغلطی` | | |
| | `importwarning` | `درآمدانتباہ` | | |
| | `indentationerror` | `حاشیہغلطی` | | |
| | `indexerror` | `اشاریہغلطی` | | |
| | `interruptederror` | `رکاوٹغلطی` | | |
| | `ioerror` | `داخلہخارجہغلطی` | | |
| | `isadirectoryerror` | `ڈائریکٹریہےغلطی` | | |
| | `keyboardinterrupt` | `کلیدتختہرکاوٹ` | | |
| | `keyerror` | `کلیدغلطی` | | |
| | `lookuperror` | `تلاشغلطی` | | |
| | `memoryerror` | `یادداشتغلطی` | | |
| | `modulenotfounderror` | `ماڈیولنہملاغلطی` | | |
| | `nameerror` | `نامغلطی` | | |
| | `notadirectoryerror` | `ڈائریکٹرینہیںغلطی` | | |
| | `notimplementederror` | `غیرنافذغلطی` | | |
| | `oserror` | `آپریٹنگنظامغلطی` | | |
| | `overflowerror` | `اوورفلوغلطی` | | |
| | `pendingdeprecationwarning` | `زیرالتواءمتروکانتباہ` | | |
| | `permissionerror` | `اجازتغلطی` | | |
| | `processlookuperror` | `عملتلاشغلطی` | | |
| | `recursionerror` | `تکرارغلطی` | | |
| | `referenceerror` | `حوالہغلطی` | | |
| | `resourcewarning` | `وسائلانتباہ` | | |
| | `runtimeerror` | `وقتعملغلطی` | | |
| | `runtimewarning` | `وقتعملانتباہ` | | |
| | `stopasynciteration` | `غیرہمزمانتکراررُک` | | |
| | `stopiteration` | `تکراررُک` | | |
| | `syntaxerror` | `نحوغلطی` | | |
| | `syntaxwarning` | `نحوانتباہ` | | |
| | `systemexit` | `نظامخروج` | | |
| | `taberror` | `ٹیبغلطی` | | |
| | `timeouterror` | `وقتختمغلطی` | | |
| | `typeerror` | `قسم_غلطی` | | |
| | `unboundlocalerror` | `غیرمربوطمقامیغلطی` | | |
| | `unicodedecodeerror` | `یونیکوڈضابطہکشائیغلطی` | | |
| | `unicodeencodeerror` | `یونیکوڈضابطہبندیغلطی` | | |
| | `unicodeerror` | `یونیکوڈغلطی` | | |
| | `unicodetranslateerror` | `یونیکوڈترجمہغلطی` | | |
| | `unicodewarning` | `یونیکوڈانتباہ` | | |
| | `userwarning` | `صارفاطلاع` | | |
| | `valueerror` | `قدرغلطی` | | |
| | `warning` | `انتباہ` | | |
| | `zerodivisionerror` | `صفرتقسیمغلطی` | | |
| ## Example Code | |
| Here's an example showing Urdu Python code with Legesher: | |
| ```python | |
| # مثال: غلطی کی ہینڈلنگ کے ساتھ فیکٹوریل فنکشن | |
| سے typing درآمد Optional | |
| تعریف فیکٹوریل(n): | |
| """عدد ن کا فیکٹوریل حساب کریں۔""" | |
| اگر n < 0: | |
| اٹھاؤ قدرغلطی("منفی اعداد کی اجازت نہیں") | |
| ورنہاگر n == 0 یا n == 1: | |
| واپسی 1 | |
| ورنہ: | |
| واپسی n * فیکٹوریل(n - 1) | |
| تعریف مرکزی(): | |
| اعداد = [عددصحیح(x) لیے x میں حدود(6)] | |
| لیے عدد میں اعداد: | |
| نتیجہ = فیکٹوریل(عدد) | |
| چھاپو(f"{عدد}! = {نتیجہ}") | |
| # جبتک لوپ کا مظاہرہ | |
| گنتی = 0 | |
| جبتک گنتی < 3: | |
| چھاپو(f"گنتی: {گنتی}") | |
| گنتی += 1 | |
| # کوشش/سوائے کا مظاہرہ | |
| کوشش: | |
| فیکٹوریل(-1) | |
| سوائے قدرغلطی بطور غلطی: | |
| چھاپو(f"غلطی: {غلطی}") | |
| بالآخر: | |
| چھاپو("مکمل!") | |
| اگر __name__ == "__main__": | |
| مرکزی() | |
| ``` | |
| ## Usage | |
| ```python | |
| from legesher_i18n import LanguagePackLoader | |
| # Load Urdu pack for Python 3.12 | |
| loader = LanguagePackLoader() | |
| pack = loader.load("ur", "python", "3.12") | |
| # Translate code | |
| from legesher import translate | |
| english_code = translate(your_ur_code, from_lang="ur", to_lang="en") | |
| ``` | |
| ## Contributing | |
| Found a better translation? We welcome contributions from native speakers! | |
| 1. Edit `legesher_i18n_python_ur/packs/<version>.yml` for the Python version where the term was introduced: | |
| - `3.10.yml` - Base translations (most terms) | |
| - `3.11.yml` - Terms added in Python 3.11 (e.g., `except*`) | |
| - `3.12.yml` - Terms added in Python 3.12 (e.g., `type`) | |
| - `3.13.yml` / `3.14.yml` - Future additions | |
| 2. Submit a pull request with your reasoning | |
| 3. Translations should be natural, commonly used in CS education, and easy to type | |