|
@@ -77,7 +77,12 @@ class Search(object):
|
77
|
77
|
def parse_query(self):
|
78
|
78
|
query_parts = self.query.split()
|
79
|
79
|
modified = False
|
80
|
|
- if query_parts[0].startswith('!'):
|
|
80
|
+ if query_parts[0].startswith(':'):
|
|
81
|
+ lang = query_parts[0][1:]
|
|
82
|
+ if lang in (x[0] for x in language_codes):
|
|
83
|
+ self.lang = lang
|
|
84
|
+ modified = True
|
|
85
|
+ elif query_parts[0].startswith('!'):
|
81
|
86
|
prefix = query_parts[0][1:].replace('_', ' ')
|
82
|
87
|
if prefix in engine_shortcuts\
|
83
|
88
|
and not engine_shortcuts[prefix] in self.blocked_engines:
|