Search code examples
c++winapisapi

what is the language code for Turkish in SAPI


I'm working on a desktop application on Windows using Windows API. Application sends notifications and notifications must be spoken in Turkish language. What's the code for Turkish language that required on Language parameter in ISpVoice::Speak function?

if(FAILED(voice->Speak((L"<sapi><voice required=\"Language=409\">"+alertBody+L"</voice></sapi>").c_str(), SPF_DEFAULT, NULL))) {
   throw Error::Exception(L"Hatırlatma seslendirmesi yapılamadı!", L"Randevu Hatırlatma Hatası");
                } 

Thanks in advance.


Solution

  • It's 41f.

    if(FAILED(voice->Speak((L"<sapi><voice required=\"Language=41f\">"+alertBody+L"</voice></sapi>").c_str(), SPF_DEFAULT, NULL))) {
       // ...
    } 
    

    You can find it in the documentation: Windows Language Code Identifier (LCID) Reference