tdlib / td

Cross-platform library for building Telegram clients
https://core.telegram.org/tdlib
Boost Software License 1.0
7.11k stars 1.44k forks source link

MtprotoHeader lang_pack value #2514

Closed AqlaSolutions closed 1 year ago

AqlaSolutions commented 1 year ago

What value is set there? Is there a way to control it?

levlam commented 1 year ago

See documentation for "localization_target" option at https://core.telegram.org/tdlib/options.

AqlaSolutions commented 1 year ago

How can I set these options in C# with C++/CLI tdlib?

levlam commented 1 year ago

Use the method TdApi.SetOption.

AqlaSolutions commented 1 year ago

Do I need to call client.Send(new SetOption(...))? Or should it be Td.Client.Execute(new SetOption(...))?

levlam commented 1 year ago

SetOption isn't a synchronous method and can't be called with Execute. Otherwise, it would be documented as such.

AqlaSolutions commented 1 year ago

Ok. It's confusing that in C# Execute is a static method while Send is instance method. So the difference is not just in being synchronous but in global/instance state.