File size: 10,131 Bytes
0807ad2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
# Urdu (اردو) - Python Quick Reference

![Legesher](https://img.shields.io/badge/Legesher-ur-blue?style=for-the-badge&logo=python&logoColor=white)
![Script](https://img.shields.io/badge/Script-Arabic-green?style=for-the-badge)
![Status](https://img.shields.io/badge/Status-Experimental-yellow?style=for-the-badge)
![RTL](https://img.shields.io/badge/Direction-RTL-orange?style=for-the-badge)

> 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