# DeviceAtlas Device Detection API Config # Device Detection API Config provides options to customize the way the API behaves in terms of device properties. ## Contents ## * [da_config_t](#config) * [How it works](#how_it_works) <a name="config"></a> ### da_config_t ### * [Include User-Agent properties](#include_ua_props) * [Include language properties](#include_lang_props) <a name="include_ua_props"></a> #### Include User-Agent properties #### Boolean value to enable/disable the addition of User-Agent properties to the detection. They are also known as "dynamic" properties as they can be detected on the fly by directly parsing the User-Agent. Enabling this property will reduce API detection performance. If dynamic properties are not needed, set it to `False`. User-Agent/Dynamic properties: `browserName, browserVersion, browserRenderingEngine, osName, osVersion` **Config property:** `da_config_t.ua_props` **Possible values:** True/False **Default Value:** True <a name="include_lang_props"></a> #### Include language properties #### Boolean value to enable/disable the addition of client's language and locale preferences to the device property set. If these properties are not needed, it should be set to FALSE. Language properties: `language, languageLocale` **Config property:** `da_config_t.lang_props` **Possible values:** True/False **Default Value:** True <a name="how_it_works"></a> ### How it works ### This section describes how to use the `da_config_t` instance to modify the behavior of the `da_atlas_t` instance when performing the device properties lookup. <a name="use_default_settings"></a> #### Use of the default settings #### When a new instance of a `da_atlas_t` is initialized, internally another instance of the `da_config_t` class is generated with the default settings. <a name="use_custom_settings"></a> #### Use of custom settings #### In order to use custom settings, it is required to explicitly create a `da_config_t` instance, set the settings and pass it to the `da_atlas_t` instance. ```c da_config_t config; config.ua_props = 0; // Bypass the dynamic properties, if not part of the expected property set, boosting the performance. config.lang_props = 0; // Bypass the language and locale properties. da_atlas_setconfig(&atlas, &config); ``` - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - _ Copyright (c) DeviceAtlas Limited 2021. All Rights Reserved. _ _ https://deviceatlas.com _ <!-- HTML+JS for document formatting when opened in browser --> <div class="btn-group" id="main-menu" style="float:right"><a class="btn dropdown-toggle" data-toggle="dropdown" href="#">Menu<span class="caret"></span></a><ul class="dropdown-menu"><li><a href="README.html">Main</a></li><li class="divider"></li><li><a href="README.DeviceApi-Web.html">Device Detection for Web</a></li><li><a href="README.DeviceApi-Apps.html">Device Detection for Apps</a></li><li class="disabled"><a href="README.DeviceApi-Config.html">Device Detection API Config</a></li><li><a href="README.CarrierApi.html">Carrier Identification API</a></li><li class="divider"></li><li><a href="README.Unix.html">C API and Unix</a></li><li><a href="README.Windows.html">C API and Windows</a></li><li class="divider"></li><li><a href="README.Nginx.html">C API and NGINX Module Installation</a></li><li class="divider"></li><li><a href="README.JsonConverter.html">C API JSONConverter</a></li><li><a href="README.ClientSide.html">Client-side Component</a></li><li><a href="ApiDocs/index.html">DeviceAtlas ApiDocs</a></li></ul></div>