<commit_before><?php

namespace ContentTranslator\Admin;

class AdminBar
{
    public function __construct()
    {
        add_action('admin_bar_menu', array($this, 'addSwitcher'), 999);
    }

    public function addSwitcher()
    {
        do_action('wp-content-translator/before_add_admin_menu_item');

        global $wp_admin_bar;

        if (!empty(wp_content_translator_languages('installed'))) {

            $wp_admin_bar->add_node( array(
                'id' => 'language_links',
                'title' => __('Language', 'wp-content-translator'),
                'href' => admin_url('admin.php?page=languages')
            ));<commit_msg>Show selected lang in adminbar.<commit_after><?php

namespace ContentTranslator\Admin;

class AdminBar
{
    public function __construct()
    {
        add_action('admin_bar_menu', array($this, 'addSwitcher'), 999);
    }

    public function addSwitcher()
    {
        do_action('wp-content-translator/before_add_admin_menu_item');

        global $wp_admin_bar;

        if (!empty(wp_content_translator_languages('installed'))) {

            $wp_admin_bar->add_node( array(
                'id' => 'language_links',
                'title' => __('Language', 'wp-content-translator') . " - " . wp_content_translator_current_language()->name,
                'href' => admin_url('admin.php?page=languages')
            ));
{'fraction_non_alphanumeric': 0.13507625272331156, 'fraction_numerical': 0.004357298474945534, 'mean_word_length': 2.7650273224043715, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 12, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '640890', 'n_tokens_mistral': 430, 'n_tokens_neox': 413, 'n_words': 63}