Logo Search packages:      
Sourcecode: ibus-table version File versions  Download package

def table::editor::get_chinese_mode (   self  ) 

Use LC_CTYPE in your box to determine the _chinese_mode

Definition at line 102 of file table.py.

00102                                :
        '''Use LC_CTYPE in your box to determine the _chinese_mode'''
        try:
            __lc = os.environ['LC_CTYPE'].split('.')[0].lower()
            if __lc.find('zh_') == 0:
                # this is a zh_XX
                __place =__lc.split('_')[1]
                if __place == 'cn':
                    return 0
                else:
                    return 1
            else:
                if self.db._is_chinese():
                    # if IME declare as Chinese IME
                    return 0
                else:
                    return -1
        except:
            return -1
                
    def change_chinese_mode (self):


Generated by  Doxygen 1.6.0   Back to index