ttkbootstrap icon indicating copy to clipboard operation
ttkbootstrap copied to clipboard

Fixed OS language issue in setlocale function

Open ErtungaYusuf opened this issue 1 year ago • 1 comments

Hey,

I couldnt manage the use module and after some research I saw a bug that occurs in people with different os languages. I also found that there is an open issue about this (https://github.com/israel-dryer/ttkbootstrap/issues/505) After a bit working I fixed the issue by getting os language with ctypes module and placing it.

ErtungaYusuf avatar Dec 04 '23 22:12 ErtungaYusuf

This doesn't work on OSX

Traceback (most recent call last):
  File "/test.py", line 11, in <module>
    import ttkbootstrap as tb
  File "venv/lib/python3.10/site-packages/ttkbootstrap/__init__.py", line 3, in <module>
    from ttkbootstrap.widgets import *
  File "venv/lib/python3.10/site-packages/ttkbootstrap/widgets.py", line 14, in <module>
    from ttkbootstrap.dialogs import Querybox
  File "/venv/lib/python3.10/site-packages/ttkbootstrap/dialogs/__init__.py", line 1, in <module>
    from ttkbootstrap.dialogs.dialogs import *
  File "venv/lib/python3.10/site-packages/ttkbootstrap/dialogs/dialogs.py", line 536, in <module>
    class DatePickerDialog:
  File "=venv/lib/python3.10/site-packages/ttkbootstrap/dialogs/dialogs.py", line 566, in DatePickerDialog
    windll = ctypes.windll.kernel32
AttributeError: module 'ctypes' has no attribute 'windll'

mmebsout avatar Jan 10 '24 09:01 mmebsout