Loading ...
Sorry, an error occurred while loading the content.
 

Re: Language Detect

Expand Messages
  • Bram Moolenaar
    ... [...] It s nice that this works. I still wonder if there isn t a Win32 function that produces these results. Or even just the first two letters. -- This
    Message 1 of 2 , Aug 31, 2001
      Yasuhiro Matsumoto wrote:

      > Below is a script for detecting language.
      > How about this?
      >
      > --- lang_detect.vim ---------------------------------------
      > if $LANG != ""
      > finish
      > endif
      >
      > function! GetUserLang()
      > let langID = libcallnr("kernel32", "GetUserDefaultLangID", "")
      > if langID == 1025
      > return "ar_SA"
      > endif
      > if langID == 1026
      > return "bg_BG"
      > endif
      [...]

      It's nice that this works.

      I still wonder if there isn't a Win32 function that produces these
      results. Or even just the first two letters.

      --
      This is the polymorph virus! Follow these instructions carefully:
      1. Send this message to everybody you know.
      2. Format your harddisk.
      Thank you for your cooperation in spreading the most powerful virus ever!

      /// Bram Moolenaar -- Bram@... -- http://www.moolenaar.net \\\
      ((( Creator of Vim -- http://vim.sf.net -- ftp://ftp.vim.org/pub/vim )))
      \\\ Help me helping AIDS orphans in Uganda - http://iccf-holland.org ///
    Your message has been successfully submitted and would be delivered to recipients shortly.