Sublime Forum

en_DK locale causing problems

#1

I’ve got a couple of ubuntu boxes which are using “en_DK” as “locale”.
ST2 does not seem to like that very much.

I’ve install the Package Control plugin. The “install” option did not appear which is why I checked the console.

It seems like Python has a problem with that specific locale. My Python experience is very limited. I’ve been googling the issue and attempted changes to locale.py in both /usr/lib/python2.6 and /usr/lib/python2.7. My guess is that the lib/python26.zip file is being used.

Changing the locale to en_GB - or whatever - solves the problem. But it is not really a permanent solution.

The content of the console:

startup, version: 2181 linux x32 channel: stable
executable: /home/msg/apps/Sublime Text 2/sublime_text
working dir: /home/msg/Documents
packages path: /home/msg/.config/sublime-text-2/Packages
settings path: /home/msg/.config/sublime-text-2/Settings
error parsing session: No data at: 0:0
PackageSetup not required
Py_GetProgramName(): sublime_text
Py_GetExecPrefix(): .
Py_GetProgramFullPath():
Py_GetPath(): ./lib/python26.zip:./lib/python2.6/:./lib/python2.6/plat-linux2:./lib/python2.6/lib-tk:./lib/python2.6/lib-old:./lib/python2.6/lib-dynload
Py_GetPythonHome(): .
catalogue loaded
found 11 files for base name Default.sublime-keymap
found 2 files for base name Default.sublime-mousemap
found 6 files for base name Main.sublime-menu
Reloading plugin /home/msg/.config/sublime-text-2/Packages/Clipboard History/clipboard.py
Reloading plugin /home/msg/.config/sublime-text-2/Packages/Default/comment.py
Reloading plugin /home/msg/.config/sublime-text-2/Packages/Default/copy_path.py
Reloading plugin /home/msg/.config/sublime-text-2/Packages/Default/delete_word.py
Reloading plugin /home/msg/.config/sublime-text-2/Packages/Default/detect_indentation.py
Reloading plugin /home/msg/.config/sublime-text-2/Packages/Default/duplicate_line.py
Reloading plugin /home/msg/.config/sublime-text-2/Packages/Default/echo.py
Reloading plugin /home/msg/.config/sublime-text-2/Packages/Default/exec.py
Reloading plugin /home/msg/.config/sublime-text-2/Packages/Default/fold.py
Reloading plugin /home/msg/.config/sublime-text-2/Packages/Default/font.py
Reloading plugin /home/msg/.config/sublime-text-2/Packages/Default/goto_line.py
Reloading plugin /home/msg/.config/sublime-text-2/Packages/Default/indentation.py
Reloading plugin /home/msg/.config/sublime-text-2/Packages/Default/kill_ring.py
Reloading plugin /home/msg/.config/sublime-text-2/Packages/Default/mark.py
Reloading plugin /home/msg/.config/sublime-text-2/Packages/Default/new_templates.py
Reloading plugin /home/msg/.config/sublime-text-2/Packages/Default/open_file_settings.py
Reloading plugin /home/msg/.config/sublime-text-2/Packages/Default/paragraph.py
Reloading plugin /home/msg/.config/sublime-text-2/Packages/Default/save_on_focus_lost.py
Reloading plugin /home/msg/.config/sublime-text-2/Packages/Default/scroll.py
Reloading plugin /home/msg/.config/sublime-text-2/Packages/Default/set_unsaved_view_name.py
Reloading plugin /home/msg/.config/sublime-text-2/Packages/Default/side_bar.py
Reloading plugin /home/msg/.config/sublime-text-2/Packages/Default/sort.py
Reloading plugin /home/msg/.config/sublime-text-2/Packages/Default/swap_line.py
Reloading plugin /home/msg/.config/sublime-text-2/Packages/Default/switch_file.py
Reloading plugin /home/msg/.config/sublime-text-2/Packages/Default/transform.py
Reloading plugin /home/msg/.config/sublime-text-2/Packages/Default/transpose.py
Reloading plugin /home/msg/.config/sublime-text-2/Packages/Default/trim_trailing_white_space.py
Reloading plugin /home/msg/.config/sublime-text-2/Packages/Diff/diff.py
Reloading plugin /home/msg/.config/sublime-text-2/Packages/HTML/encode_html_entities.py
Reloading plugin /home/msg/.config/sublime-text-2/Packages/HTML/html_completions.py
Reloading plugin /home/msg/.config/sublime-text-2/Packages/Package Control/Package Control.py
Traceback (most recent call last):
File “./sublime_plugin.py”, line 62, in reload_plugin
File “./Package Control.py”, line 17, in
import _strptime
File “._strptime.py”, line 270, in
File “._strptime.py”, line 188, in init
File “._strptime.py”, line 70, in init
File “._strptime.py”, line 29, in _getlang
File “.\locale.py”, line 497, in getlocale
File “.\locale.py”, line 410, in _parse_localename
ValueError: unknown locale: en_DK
Reloading plugin /home/msg/.config/sublime-text-2/Packages/Prefixr/Prefixr.py
Reloading plugin /home/msg/.config/sublime-text-2/Packages/SFTP/SFTP.py
Reloading plugin /home/msg/.config/sublime-text-2/Packages/SublimeCodeIntel/SublimeCodeIntel.py
Reloading plugin /home/msg/.config/sublime-text-2/Packages/SublimeLinter/SublimeLinter.py
SublimeLinter: java loaded
SublimeLinter: ruby loaded
SublimeLinter: python loaded
SublimeLinter: JavaScript loaded
SublimeLinter: coffeescript loaded
SublimeLinter: pylint loaded
SublimeLinter: Objective-J loaded
SublimeLinter: perl loaded
SublimeLinter: php loaded
SublimeLinter: annotations loaded
Reloading plugin /home/msg/.config/sublime-text-2/Packages/ZenCoding/dynamicsnippets.py
Reloading plugin /home/msg/.config/sublime-text-2/Packages/ZenCoding/sublimezen.py
Reloading plugin /home/msg/.config/sublime-text-2/Packages/ZenCoding/sublimezenplugin.py
Reloading plugin /home/msg/.config/sublime-text-2/Packages/ZenCoding/zenarbitrage.py
Reloading plugin /home/msg/.config/sublime-text-2/Packages/ZenCoding/zenmeta.py
Reloading plugin /home/msg/.config/sublime-text-2/Packages/ZenCoding/zentrackers.py
Reloading plugin /home/msg/.config/sublime-text-2/Packages/sublime-split-navigation/SplitNavigation.py
plugin init time: 1.09597
loading bindings
loading pointer bindings
found 1 files for base name Default.sublime-theme
theme loaded
app ready
pre session restore time: 1.40563
using gamma: 1 (err: 0)
startup cache, total files: 107 cache hits: 107
startup time: 1.70445 (package setup was not run)
loaded 940 snippets

Suggestions will be highly appreciated :smile:

0 Likes

#2

Ok - I’ve given up on getting en_DK to work… at least for now… :smile: It would probably require a bit of digging into Python which I don’t really have the time for right now.

Just in case someone else is looking for a solution…
The purpose is obviously to get support for DK locals (keyboard, currency etc.), an english interface - and ST2 to work.

I think the best solution is to set locales to something like:
LANG=“da_DK”
LANGUAGE=“en_GB”

0 Likes