Skip to content

Instantly share code, notes, and snippets.

@simecek
Created March 18, 2022 16:21
Show Gist options
  • Save simecek/e311529469f6dd81b46d9e3791a54f24 to your computer and use it in GitHub Desktop.
Save simecek/e311529469f6dd81b46d9e3791a54f24 to your computer and use it in GitHub Desktop.
locales_demo.ipynb
Display the source blob
Display the rendered blob
Raw
{
"nbformat": 4,
"nbformat_minor": 0,
"metadata": {
"colab": {
"name": "locales_demo.ipynb",
"provenance": [],
"collapsed_sections": [],
"authorship_tag": "ABX9TyNFF1LsCzHwJoGtZX2nJ0xc",
"include_colab_link": true
},
"kernelspec": {
"name": "python3",
"display_name": "Python 3"
},
"language_info": {
"name": "python"
}
},
"cells": [
{
"cell_type": "markdown",
"metadata": {
"id": "view-in-github",
"colab_type": "text"
},
"source": [
"<a href=\"https://colab.research.google.com/gist/simecek/e311529469f6dd81b46d9e3791a54f24/locales_demo.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>"
]
},
{
"cell_type": "code",
"source": [
"# this installs locales (input: 96, 210 to install Czech and Estonian locales)\n",
"!sudo dpkg-reconfigure locales\n",
"# restart runtime (Ctrl-M .) before running next cell"
],
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "NfcdRPTRg4S6",
"outputId": "37a22a0a-5545-4d08-981b-0a129c7864c3"
},
"execution_count": 20,
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"perl: warning: Setting locale failed.\n",
"perl: warning: Please check that your locale settings:\n",
"\tLANGUAGE = (unset),\n",
"\tLC_ALL = (unset),\n",
"\tLC_CTYPE = \"C.UTF-8\",\n",
"\tLANG = \"en_US.UTF-8\"\n",
" are supported and installed on your system.\n",
"perl: warning: Falling back to the standard locale (\"C\").\n",
"debconf: unable to initialize frontend: Dialog\n",
"debconf: (No usable dialog-like program is installed, so the dialog based frontend cannot be used. at /usr/share/perl5/Debconf/FrontEnd/Dialog.pm line 76.)\n",
"debconf: falling back to frontend: Readline\n",
"debconf: unable to initialize frontend: Readline\n",
"debconf: (This frontend requires a controlling tty.)\n",
"debconf: falling back to frontend: Teletype\n",
"Configuring locales\n",
"-------------------\n",
"\n",
"Locales are a framework to switch between multiple languages and allow users to\n",
"use their language, country, characters, collation order, etc.\n",
"\n",
"Please choose which locales to generate. UTF-8 locales should be chosen by\n",
"default, particularly for new installations. Other character sets may be useful\n",
"for backwards compatibility with older systems and software.\n",
"\n",
" 1. All locales 250. gl_ES ISO-8859-1\n",
" 2. aa_DJ ISO-8859-1 251. gl_ES.UTF-8 UTF-8\n",
" 3. aa_DJ.UTF-8 UTF-8 252. gl_ES@euro ISO-8859-15\n",
" 4. aa_ER UTF-8 253. gu_IN UTF-8\n",
" 5. aa_ER@saaho UTF-8 254. gv_GB ISO-8859-1\n",
" 6. aa_ET UTF-8 255. gv_GB.UTF-8 UTF-8\n",
" 7. af_ZA ISO-8859-1 256. ha_NG UTF-8\n",
" 8. af_ZA.UTF-8 UTF-8 257. hak_TW UTF-8\n",
" 9. agr_PE UTF-8 258. he_IL ISO-8859-8\n",
" 10. ak_GH UTF-8 259. he_IL.UTF-8 UTF-8\n",
" 11. am_ET UTF-8 260. hi_IN UTF-8\n",
" 12. an_ES ISO-8859-15 261. hif_FJ UTF-8\n",
" 13. an_ES.UTF-8 UTF-8 262. hne_IN UTF-8\n",
" 14. anp_IN UTF-8 263. hr_HR ISO-8859-2\n",
" 15. ar_AE ISO-8859-6 264. hr_HR.UTF-8 UTF-8\n",
" 16. ar_AE.UTF-8 UTF-8 265. hsb_DE ISO-8859-2\n",
" 17. ar_BH ISO-8859-6 266. hsb_DE.UTF-8 UTF-8\n",
" 18. ar_BH.UTF-8 UTF-8 267. ht_HT UTF-8\n",
" 19. ar_DZ ISO-8859-6 268. hu_HU ISO-8859-2\n",
" 20. ar_DZ.UTF-8 UTF-8 269. hu_HU.UTF-8 UTF-8\n",
" 21. ar_EG ISO-8859-6 270. hy_AM UTF-8\n",
" 22. ar_EG.UTF-8 UTF-8 271. hy_AM.ARMSCII-8 ARMSCII-8\n",
" 23. ar_IN UTF-8 272. ia_FR UTF-8\n",
" 24. ar_IQ ISO-8859-6 273. id_ID ISO-8859-1\n",
" 25. ar_IQ.UTF-8 UTF-8 274. id_ID.UTF-8 UTF-8\n",
" 26. ar_JO ISO-8859-6 275. ig_NG UTF-8\n",
" 27. ar_JO.UTF-8 UTF-8 276. ik_CA UTF-8\n",
" 28. ar_KW ISO-8859-6 277. is_IS ISO-8859-1\n",
" 29. ar_KW.UTF-8 UTF-8 278. is_IS.UTF-8 UTF-8\n",
" 30. ar_LB ISO-8859-6 279. it_CH ISO-8859-1\n",
" 31. ar_LB.UTF-8 UTF-8 280. it_CH.UTF-8 UTF-8\n",
" 32. ar_LY ISO-8859-6 281. it_IT ISO-8859-1\n",
" 33. ar_LY.UTF-8 UTF-8 282. it_IT.UTF-8 UTF-8\n",
" 34. ar_MA ISO-8859-6 283. it_IT@euro ISO-8859-15\n",
" 35. ar_MA.UTF-8 UTF-8 284. iu_CA UTF-8\n",
" 36. ar_OM ISO-8859-6 285. ja_JP.EUC-JP EUC-JP\n",
" 37. ar_OM.UTF-8 UTF-8 286. ja_JP.UTF-8 UTF-8\n",
" 38. ar_QA ISO-8859-6 287. ka_GE GEORGIAN-PS\n",
" 39. ar_QA.UTF-8 UTF-8 288. ka_GE.UTF-8 UTF-8\n",
" 40. ar_SA ISO-8859-6 289. kab_DZ UTF-8\n",
" 41. ar_SA.UTF-8 UTF-8 290. kk_KZ PT154\n",
" 42. ar_SD ISO-8859-6 291. kk_KZ.RK1048 RK1048\n",
" 43. ar_SD.UTF-8 UTF-8 292. kk_KZ.UTF-8 UTF-8\n",
" 44. ar_SS UTF-8 293. kl_GL ISO-8859-1\n",
" 45. ar_SY ISO-8859-6 294. kl_GL.UTF-8 UTF-8\n",
" 46. ar_SY.UTF-8 UTF-8 295. km_KH UTF-8\n",
" 47. ar_TN ISO-8859-6 296. kn_IN UTF-8\n",
" 48. ar_TN.UTF-8 UTF-8 297. ko_KR.EUC-KR EUC-KR\n",
" 49. ar_YE ISO-8859-6 298. ko_KR.UTF-8 UTF-8\n",
" 50. ar_YE.UTF-8 UTF-8 299. kok_IN UTF-8\n",
" 51. as_IN UTF-8 300. ks_IN UTF-8\n",
" 52. ast_ES ISO-8859-15 301. ks_IN@devanagari UTF-8\n",
" 53. ast_ES.UTF-8 UTF-8 302. ku_TR ISO-8859-9\n",
" 54. ayc_PE UTF-8 303. ku_TR.UTF-8 UTF-8\n",
" 55. az_AZ UTF-8 304. kw_GB ISO-8859-1\n",
" 56. az_IR UTF-8 305. kw_GB.UTF-8 UTF-8\n",
" 57. be_BY CP1251 306. ky_KG UTF-8\n",
" 58. be_BY.UTF-8 UTF-8 307. lb_LU UTF-8\n",
" 59. be_BY@latin UTF-8 308. lg_UG ISO-8859-10\n",
" 60. bem_ZM UTF-8 309. lg_UG.UTF-8 UTF-8\n",
" 61. ber_DZ UTF-8 310. li_BE UTF-8\n",
" 62. ber_MA UTF-8 311. li_NL UTF-8\n",
" 63. bg_BG CP1251 312. lij_IT UTF-8\n",
" 64. bg_BG.UTF-8 UTF-8 313. ln_CD UTF-8\n",
" 65. bhb_IN.UTF-8 UTF-8 314. lo_LA UTF-8\n",
" 66. bho_IN UTF-8 315. lt_LT ISO-8859-13\n",
" 67. bho_NP UTF-8 316. lt_LT.UTF-8 UTF-8\n",
" 68. bi_VU UTF-8 317. lv_LV ISO-8859-13\n",
" 69. bn_BD UTF-8 318. lv_LV.UTF-8 UTF-8\n",
" 70. bn_IN UTF-8 319. lzh_TW UTF-8\n",
" 71. bo_CN UTF-8 320. mag_IN UTF-8\n",
" 72. bo_IN UTF-8 321. mai_IN UTF-8\n",
" 73. br_FR ISO-8859-1 322. mai_NP UTF-8\n",
" 74. br_FR.UTF-8 UTF-8 323. mfe_MU UTF-8\n",
" 75. br_FR@euro ISO-8859-15 324. mg_MG ISO-8859-15\n",
" 76. brx_IN UTF-8 325. mg_MG.UTF-8 UTF-8\n",
" 77. bs_BA ISO-8859-2 326. mhr_RU UTF-8\n",
" 78. bs_BA.UTF-8 UTF-8 327. mi_NZ ISO-8859-13\n",
" 79. byn_ER UTF-8 328. mi_NZ.UTF-8 UTF-8\n",
" 80. ca_AD ISO-8859-15 329. miq_NI UTF-8\n",
" 81. ca_AD.UTF-8 UTF-8 330. mjw_IN UTF-8\n",
" 82. ca_ES ISO-8859-1 331. mk_MK ISO-8859-5\n",
" 83. ca_ES.UTF-8 UTF-8 332. mk_MK.UTF-8 UTF-8\n",
" 84. ca_ES@euro ISO-8859-15 333. ml_IN UTF-8\n",
" 85. ca_ES@valencia UTF-8 334. mn_MN UTF-8\n",
" 86. ca_FR ISO-8859-15 335. mni_IN UTF-8\n",
" 87. ca_FR.UTF-8 UTF-8 336. mr_IN UTF-8\n",
" 88. ca_IT ISO-8859-15 337. ms_MY ISO-8859-1\n",
" 89. ca_IT.UTF-8 UTF-8 338. ms_MY.UTF-8 UTF-8\n",
" 90. ce_RU UTF-8 339. mt_MT ISO-8859-3\n",
" 91. chr_US UTF-8 340. mt_MT.UTF-8 UTF-8\n",
" 92. ckb_IQ UTF-8 341. my_MM UTF-8\n",
" 93. cmn_TW UTF-8 342. nan_TW UTF-8\n",
" 94. crh_UA UTF-8 343. nan_TW@latin UTF-8\n",
" 95. cs_CZ ISO-8859-2 344. nb_NO ISO-8859-1\n",
" 96. cs_CZ.UTF-8 UTF-8 345. nb_NO.UTF-8 UTF-8\n",
" 97. csb_PL UTF-8 346. nds_DE UTF-8\n",
" 98. cv_RU UTF-8 347. nds_NL UTF-8\n",
" 99. cy_GB ISO-8859-14 348. ne_NP UTF-8\n",
" 100. cy_GB.UTF-8 UTF-8 349. nhn_MX UTF-8\n",
" 101. da_DK ISO-8859-1 350. niu_NU UTF-8\n",
" 102. da_DK.UTF-8 UTF-8 351. niu_NZ UTF-8\n",
" 103. de_AT ISO-8859-1 352. nl_AW UTF-8\n",
" 104. de_AT.UTF-8 UTF-8 353. nl_BE ISO-8859-1\n",
" 105. de_AT@euro ISO-8859-15 354. nl_BE.UTF-8 UTF-8\n",
" 106. de_BE ISO-8859-1 355. nl_BE@euro ISO-8859-15\n",
" 107. de_BE.UTF-8 UTF-8 356. nl_NL ISO-8859-1\n",
" 108. de_BE@euro ISO-8859-15 357. nl_NL.UTF-8 UTF-8\n",
" 109. de_CH ISO-8859-1 358. nl_NL@euro ISO-8859-15\n",
" 110. de_CH.UTF-8 UTF-8 359. nn_NO ISO-8859-1\n",
" 111. de_DE ISO-8859-1 360. nn_NO.UTF-8 UTF-8\n",
" 112. de_DE.UTF-8 UTF-8 361. nr_ZA UTF-8\n",
" 113. de_DE@euro ISO-8859-15 362. nso_ZA UTF-8\n",
" 114. de_IT ISO-8859-1 363. oc_FR ISO-8859-1\n",
" 115. de_IT.UTF-8 UTF-8 364. oc_FR.UTF-8 UTF-8\n",
" 116. de_LI.UTF-8 UTF-8 365. om_ET UTF-8\n",
" 117. de_LU ISO-8859-1 366. om_KE ISO-8859-1\n",
" 118. de_LU.UTF-8 UTF-8 367. om_KE.UTF-8 UTF-8\n",
" 119. de_LU@euro ISO-8859-15 368. or_IN UTF-8\n",
" 120. doi_IN UTF-8 369. os_RU UTF-8\n",
" 121. dv_MV UTF-8 370. pa_IN UTF-8\n",
" 122. dz_BT UTF-8 371. pa_PK UTF-8\n",
" 123. el_CY ISO-8859-7 372. pap_AW UTF-8\n",
" 124. el_CY.UTF-8 UTF-8 373. pap_CW UTF-8\n",
" 125. el_GR ISO-8859-7 374. pl_PL ISO-8859-2\n",
" 126. el_GR.UTF-8 UTF-8 375. pl_PL.UTF-8 UTF-8\n",
" 127. el_GR@euro ISO-8859-7 376. ps_AF UTF-8\n",
" 128. en_AG UTF-8 377. pt_BR ISO-8859-1\n",
" 129. en_AU ISO-8859-1 378. pt_BR.UTF-8 UTF-8\n",
" 130. en_AU.UTF-8 UTF-8 379. pt_PT ISO-8859-1\n",
" 131. en_BW ISO-8859-1 380. pt_PT.UTF-8 UTF-8\n",
" 132. en_BW.UTF-8 UTF-8 381. pt_PT@euro ISO-8859-15\n",
" 133. en_CA ISO-8859-1 382. quz_PE UTF-8\n",
" 134. en_CA.UTF-8 UTF-8 383. raj_IN UTF-8\n",
" 135. en_DK ISO-8859-1 384. ro_RO ISO-8859-2\n",
" 136. en_DK.ISO-8859-15 ISO-8859-15 385. ro_RO.UTF-8 UTF-8\n",
" 137. en_DK.UTF-8 UTF-8 386. ru_RU ISO-8859-5\n",
" 138. en_GB ISO-8859-1 387. ru_RU.CP1251 CP1251\n",
" 139. en_GB.ISO-8859-15 ISO-8859-15 388. ru_RU.KOI8-R KOI8-R\n",
" 140. en_GB.UTF-8 UTF-8 389. ru_RU.UTF-8 UTF-8\n",
" 141. en_HK ISO-8859-1 390. ru_UA KOI8-U\n",
" 142. en_HK.UTF-8 UTF-8 391. ru_UA.UTF-8 UTF-8\n",
" 143. en_IE ISO-8859-1 392. rw_RW UTF-8\n",
" 144. en_IE.UTF-8 UTF-8 393. sa_IN UTF-8\n",
" 145. en_IE@euro ISO-8859-15 394. sat_IN UTF-8\n",
" 146. en_IL UTF-8 395. sc_IT UTF-8\n",
" 147. en_IN UTF-8 396. sd_IN UTF-8\n",
" 148. en_NG UTF-8 397. sd_IN@devanagari UTF-8\n",
" 149. en_NZ ISO-8859-1 398. sd_PK UTF-8\n",
" 150. en_NZ.UTF-8 UTF-8 399. se_NO UTF-8\n",
" 151. en_PH ISO-8859-1 400. sgs_LT UTF-8\n",
" 152. en_PH.UTF-8 UTF-8 401. shn_MM UTF-8\n",
" 153. en_SC.UTF-8 UTF-8 402. shs_CA UTF-8\n",
" 154. en_SG ISO-8859-1 403. si_LK UTF-8\n",
" 155. en_SG.UTF-8 UTF-8 404. sid_ET UTF-8\n",
" 156. en_US ISO-8859-1 405. sk_SK ISO-8859-2\n",
" 157. en_US.ISO-8859-15 ISO-8859-15 406. sk_SK.UTF-8 UTF-8\n",
" 158. en_US.UTF-8 UTF-8 407. sl_SI ISO-8859-2\n",
" 159. en_ZA ISO-8859-1 408. sl_SI.UTF-8 UTF-8\n",
" 160. en_ZA.UTF-8 UTF-8 409. sm_WS UTF-8\n",
" 161. en_ZM UTF-8 410. so_DJ ISO-8859-1\n",
" 162. en_ZW ISO-8859-1 411. so_DJ.UTF-8 UTF-8\n",
" 163. en_ZW.UTF-8 UTF-8 412. so_ET UTF-8\n",
" 164. eo UTF-8 413. so_KE ISO-8859-1\n",
" 165. eo_US.UTF-8 UTF-8 414. so_KE.UTF-8 UTF-8\n",
" 166. es_AR ISO-8859-1 415. so_SO ISO-8859-1\n",
" 167. es_AR.UTF-8 UTF-8 416. so_SO.UTF-8 UTF-8\n",
" 168. es_BO ISO-8859-1 417. sq_AL ISO-8859-1\n",
" 169. es_BO.UTF-8 UTF-8 418. sq_AL.UTF-8 UTF-8\n",
" 170. es_CL ISO-8859-1 419. sq_MK UTF-8\n",
" 171. es_CL.UTF-8 UTF-8 420. sr_ME UTF-8\n",
" 172. es_CO ISO-8859-1 421. sr_RS UTF-8\n",
" 173. es_CO.UTF-8 UTF-8 422. sr_RS@latin UTF-8\n",
" 174. es_CR ISO-8859-1 423. ss_ZA UTF-8\n",
" 175. es_CR.UTF-8 UTF-8 424. st_ZA ISO-8859-1\n",
" 176. es_CU UTF-8 425. st_ZA.UTF-8 UTF-8\n",
" 177. es_DO ISO-8859-1 426. sv_FI ISO-8859-1\n",
" 178. es_DO.UTF-8 UTF-8 427. sv_FI.UTF-8 UTF-8\n",
" 179. es_EC ISO-8859-1 428. sv_FI@euro ISO-8859-15\n",
" 180. es_EC.UTF-8 UTF-8 429. sv_SE ISO-8859-1\n",
" 181. es_ES ISO-8859-1 430. sv_SE.ISO-8859-15 ISO-8859-15\n",
" 182. es_ES.UTF-8 UTF-8 431. sv_SE.UTF-8 UTF-8\n",
" 183. es_ES@euro ISO-8859-15 432. sw_KE UTF-8\n",
" 184. es_GT ISO-8859-1 433. sw_TZ UTF-8\n",
" 185. es_GT.UTF-8 UTF-8 434. szl_PL UTF-8\n",
" 186. es_HN ISO-8859-1 435. ta_IN UTF-8\n",
" 187. es_HN.UTF-8 UTF-8 436. ta_LK UTF-8\n",
" 188. es_MX ISO-8859-1 437. tcy_IN.UTF-8 UTF-8\n",
" 189. es_MX.UTF-8 UTF-8 438. te_IN UTF-8\n",
" 190. es_NI ISO-8859-1 439. tg_TJ KOI8-T\n",
" 191. es_NI.UTF-8 UTF-8 440. tg_TJ.UTF-8 UTF-8\n",
" 192. es_PA ISO-8859-1 441. th_TH TIS-620\n",
" 193. es_PA.UTF-8 UTF-8 442. th_TH.UTF-8 UTF-8\n",
" 194. es_PE ISO-8859-1 443. the_NP UTF-8\n",
" 195. es_PE.UTF-8 UTF-8 444. ti_ER UTF-8\n",
" 196. es_PR ISO-8859-1 445. ti_ET UTF-8\n",
" 197. es_PR.UTF-8 UTF-8 446. tig_ER UTF-8\n",
" 198. es_PY ISO-8859-1 447. tk_TM UTF-8\n",
" 199. es_PY.UTF-8 UTF-8 448. tl_PH ISO-8859-1\n",
" 200. es_SV ISO-8859-1 449. tl_PH.UTF-8 UTF-8\n",
" 201. es_SV.UTF-8 UTF-8 450. tn_ZA UTF-8\n",
" 202. es_US ISO-8859-1 451. to_TO UTF-8\n",
" 203. es_US.UTF-8 UTF-8 452. tpi_PG UTF-8\n",
" 204. es_UY ISO-8859-1 453. tr_CY ISO-8859-9\n",
" 205. es_UY.UTF-8 UTF-8 454. tr_CY.UTF-8 UTF-8\n",
" 206. es_VE ISO-8859-1 455. tr_TR ISO-8859-9\n",
" 207. es_VE.UTF-8 UTF-8 456. tr_TR.UTF-8 UTF-8\n",
" 208. et_EE ISO-8859-1 457. ts_ZA UTF-8\n",
" 209. et_EE.ISO-8859-15 ISO-8859-15 458. tt_RU UTF-8\n",
" 210. et_EE.UTF-8 UTF-8 459. tt_RU@iqtelif UTF-8\n",
" 211. eu_ES ISO-8859-1 460. ug_CN UTF-8\n",
" 212. eu_ES.UTF-8 UTF-8 461. ug_CN@latin UTF-8\n",
" 213. eu_ES@euro ISO-8859-15 462. uk_UA KOI8-U\n",
" 214. eu_FR ISO-8859-1 463. uk_UA.UTF-8 UTF-8\n",
" 215. eu_FR.UTF-8 UTF-8 464. unm_US UTF-8\n",
" 216. eu_FR@euro ISO-8859-15 465. ur_IN UTF-8\n",
" 217. fa_IR UTF-8 466. ur_PK UTF-8\n",
" 218. ff_SN UTF-8 467. uz_UZ ISO-8859-1\n",
" 219. fi_FI ISO-8859-1 468. uz_UZ.UTF-8 UTF-8\n",
" 220. fi_FI.UTF-8 UTF-8 469. uz_UZ@cyrillic UTF-8\n",
" 221. fi_FI@euro ISO-8859-15 470. ve_ZA UTF-8\n",
" 222. fil_PH UTF-8 471. vi_VN UTF-8\n",
" 223. fo_FO ISO-8859-1 472. wa_BE ISO-8859-1\n",
" 224. fo_FO.UTF-8 UTF-8 473. wa_BE.UTF-8 UTF-8\n",
" 225. fr_BE ISO-8859-1 474. wa_BE@euro ISO-8859-15\n",
" 226. fr_BE.UTF-8 UTF-8 475. wae_CH UTF-8\n",
" 227. fr_BE@euro ISO-8859-15 476. wal_ET UTF-8\n",
" 228. fr_CA ISO-8859-1 477. wo_SN UTF-8\n",
" 229. fr_CA.UTF-8 UTF-8 478. xh_ZA ISO-8859-1\n",
" 230. fr_CH ISO-8859-1 479. xh_ZA.UTF-8 UTF-8\n",
" 231. fr_CH.UTF-8 UTF-8 480. yi_US CP1255\n",
" 232. fr_FR ISO-8859-1 481. yi_US.UTF-8 UTF-8\n",
" 233. fr_FR.UTF-8 UTF-8 482. yo_NG UTF-8\n",
" 234. fr_FR@euro ISO-8859-15 483. yue_HK UTF-8\n",
" 235. fr_LU ISO-8859-1 484. yuw_PG UTF-8\n",
" 236. fr_LU.UTF-8 UTF-8 485. zh_CN GB2312\n",
" 237. fr_LU@euro ISO-8859-15 486. zh_CN.GB18030 GB18030\n",
" 238. fur_IT UTF-8 487. zh_CN.GBK GBK\n",
" 239. fy_DE UTF-8 488. zh_CN.UTF-8 UTF-8\n",
" 240. fy_NL UTF-8 489. zh_HK BIG5-HKSCS\n",
" 241. ga_IE ISO-8859-1 490. zh_HK.UTF-8 UTF-8\n",
" 242. ga_IE.UTF-8 UTF-8 491. zh_SG GB2312\n",
" 243. ga_IE@euro ISO-8859-15 492. zh_SG.GBK GBK\n",
" 244. gd_GB ISO-8859-15 493. zh_SG.UTF-8 UTF-8\n",
" 245. gd_GB.UTF-8 UTF-8 494. zh_TW BIG5\n",
" 246. gez_ER UTF-8 495. zh_TW.EUC-TW EUC-TW\n",
" 247. gez_ER@abegede UTF-8 496. zh_TW.UTF-8 UTF-8\n",
" 248. gez_ET UTF-8 497. zu_ZA ISO-8859-1\n",
" 249. gez_ET@abegede UTF-8 498. zu_ZA.UTF-8 UTF-8\n",
"\n",
"(Enter the items you want to select, separated by spaces.)\n",
"\n",
"Locales to be generated: 96, 210\n",
"\n",
"Many packages in Debian use locales to display text in the correct language for\n",
"the user. You can choose a default locale for the system from the generated\n",
"locales.\n",
"\n",
"This will select the default language for the entire system. If this system is\n",
"a multi-user system where not all users are able to speak the default language,\n",
"they will experience difficulties.\n",
"\n",
" 1. None 2. C.UTF-8 3. cs_CZ.UTF-8 4. et_EE.UTF-8\n",
"Default locale for the system environment: 2\n",
"\n",
"Generating locales (this might take a while)...\n",
" cs_CZ.UTF-8... done\n",
" et_EE.UTF-8... done\n",
"Generation complete.\n"
]
}
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"id": "-YLWUfLmf77j"
},
"outputs": [],
"source": [
"import locale\n",
"import datetime"
]
},
{
"cell_type": "code",
"source": [
"locale.setlocale(locale.LC_ALL, None) # None = default\n",
"\n",
"now = datetime.datetime.now()\n",
"format = \"%A, %d %b %Y %H:%M:%S %Z\"\n",
"now.strftime(format)"
],
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/",
"height": 35
},
"id": "fChWdJiozx5T",
"outputId": "c5992201-38e6-4931-a556-00ced7fb136b"
},
"execution_count": 2,
"outputs": [
{
"output_type": "execute_result",
"data": {
"text/plain": [
"'Friday, 18 Mar 2022 16:20:40 '"
],
"application/vnd.google.colaboratory.intrinsic+json": {
"type": "string"
}
},
"metadata": {},
"execution_count": 2
}
]
},
{
"cell_type": "code",
"source": [
"locale.setlocale(locale.LC_ALL , 'et_EE.UTF-8')\n",
"\n",
"now.strftime(format)"
],
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/",
"height": 35
},
"id": "QVIGL-p9gJQ8",
"outputId": "75f554f0-944b-42c9-899f-2c630a961bb3"
},
"execution_count": 3,
"outputs": [
{
"output_type": "execute_result",
"data": {
"text/plain": [
"'reede, 18 märts 2022 16:20:40 '"
],
"application/vnd.google.colaboratory.intrinsic+json": {
"type": "string"
}
},
"metadata": {},
"execution_count": 3
}
]
},
{
"cell_type": "code",
"source": [
"locale.setlocale(locale.LC_ALL , 'cs_CZ.UTF-8')\n",
"\n",
"now.strftime(format)\n",
"\n"
],
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/",
"height": 35
},
"id": "NWBkNpublBEZ",
"outputId": "7e040efc-2400-4422-9e40-892299372af0"
},
"execution_count": 4,
"outputs": [
{
"output_type": "execute_result",
"data": {
"text/plain": [
"'Pátek, 18 bře 2022 16:20:40 '"
],
"application/vnd.google.colaboratory.intrinsic+json": {
"type": "string"
}
},
"metadata": {},
"execution_count": 4
}
]
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment