• Hello.
    Faced the following problem: It is necessary to implement the output of the names of blogs (sites from the database) that have the language selected by the user.
    How to approach this task without going into a wild caste, I still have no idea.

    Qtranslate has an option “Hide content that is not available for the selected language”, but it does not apply to the get_sites function ….

    Getting all blogs at the moment looks like:

    $sites = \Timber\Timber::get_sites();
    $context['cities'] = array_map(function ($site) {
        $city['name'] = $site->name;
        $city['link'] = $site->siteurl;
        return $city;
    }, $sites);

    I would be glad for any help …

    • This topic was modified 4 years, 1 month ago by dekantis.
  • The topic ‘Listing blog names (from all networks) for the selected language’ is closed to new replies.