getCurrentLang().getCurrentLang().To determine the language code of the active language using getCurrentLang() when you have integrated Weglot translation into your Webflow site, follow these guidelines.
getCurrentLang() to interact with the language settings.
getCurrentLang() to retrieve the active language code from Weglot.<script> tag in the custom code section of your Webflow project.
<script> that calls getCurrentLang().```javascript
<script>
document.addEventListener('DOMContentLoaded', function() {
var lang = Weglot.getCurrentLang();
console.log("Current Language Code: ", lang);
});
</script>
```
Utilize getCurrentLang() from the Weglot integration to access the current language code by inserting a script in Webflow’s Custom Code section. This allows you to tie custom functionality to language-specific scenarios effectively.