• I’m facing an issue where I can’t seem to get the language switcher work properly.

    I set it up so that the current language is hidden and there are only two languages so only the other language is shown. However, when you click on it the page is not redirected onto that language. This holds true with both settings: Detect browser language activated and deactivated (though slightly different behaviour). I also tried to change the default language of the browser from EN to IT and while it does work for some time, after a few clicks it seems to stop working and one cannot go back to the IT version.

    You can see for yourself at https://www.lucentumrooms.it/ where I’ve left the Language Switcher visible though it’s not working.

    The default language of the website is set to EN and currently the Detect browser language is active so that in the first instance the behaviour is what is expected (redirected to browser preferred language).

    I paste down here the system info:

    ` wp-core
    
    version: 6.4.2
    site_language: en_GB
    user_language: en_GB
    timezone: Europe/Rome
    permalink: /%category%/%postname%/
    https_status: true
    multisite: false
    user_registration: 0
    blog_public: 0
    default_comment_status: open
    environment_type: production
    user_count: 2
    dotorg_communication: true wp-paths-sizes wordpress_path: /web/htdocs/www.lucentumrooms.it/home
    wordpress_size: 2.18 GB (2344521857 bytes)
    uploads_path: /web/htdocs/www.lucentumrooms.it/home/wp-content/uploads
    uploads_size: 119.30 MB (125093560 bytes)
    themes_path: /web/htdocs/www.lucentumrooms.it/home/wp-content/themes
    themes_size: 18.04 MB (18913732 bytes)
    plugins_path: /web/htdocs/www.lucentumrooms.it/home/wp-content/plugins
    plugins_size: 106.07 MB (111218726 bytes)
    database_size: 12.00 MB (12582912 bytes)
    total_size: 2.43 GB (2612330787 bytes) wp-active-theme name: Hotel Master Child (hotelmaster-child)
    version: 1.0.0
    author: Sara Polselli
    author_website: https://lookatthat.cloud
    parent_theme: Hotel Master (hotelmaster)
    theme_features: core-block-patterns, widgets, woocommerce, widgets-block-editor, post-thumbnails, menus, title-tag, automatic-feed-links, post-formats, editor-style
    theme_path: /web/htdocs/www.lucentumrooms.it/home/wp-content/themes/hotelmaster-child
    auto_update: Disabled wp-parent-theme name: Hotel Master (hotelmaster)
    version: 4.1.8
    author: Goodlayers
    author_website: https://www.goodlayers.com
    theme_path: /web/htdocs/www.lucentumrooms.it/home/wp-content/themes/hotelmaster
    auto_update: Disabled wp-plugins-active (14) Connect Polylang for Elementor: version: 2.4.3, author: Creame, Auto-updates disabled
    Contact Form 7: version: 5.8.5, author: Takayuki Miyoshi (latest version: 5.8.7), Auto-updates disabled
    Custom Fonts: version: 2.1.1, author: Brainstorm Force (latest version: 2.1.3), Auto-updates disabled
    Elementor: version: 3.18.3, author: Elementor.com (latest version: 3.19.2), Auto-updates disabled
    Goodlayers Hotel Plugin: version: 3.1.3, author: Goodlayers, Auto-updates disabled
    Goodlayers Portflio Post Type: version: 1.0.1, author: Goodlayers, Auto-updates disabled
    Goodlayers Shortcode: version: 1.0, author: Goodlayers, Auto-updates disabled
    Master Slider Pro: version: 3.6.5, author: averta, Auto-updates disabled
    Polylang: version: 3.5.3, author: WP SYNTEX (latest version: 3.5.4), Auto-updates disabled
    Smush: version: 3.15.3, author: WPMU DEV (latest version: 3.15.5), Auto-updates disabled
    SVG Support: version: 2.5.5, author: Benbodhi, Auto-updates disabled
    WP-CFM: version: 1.7.8, author: Forum One (latest version: 1.7.9), Auto-updates disabled
    WP Maps: version: 4.5.5, author: flippercode (latest version: 4.5.6), Auto-updates disabled
    Yoast Duplicate Post: version: 4.5, author: Enrico Battocchi & Team Yoast, Auto-updates disabled wp-plugins-inactive (3) Akismet Anti-spam: Spam Protection: version: 5.3, author: Automattic - Anti-spam Team (latest version: 5.3.1), Auto-updates disabled
    Goodlayers Hostel Plugin: version: 3.1.1, author: Goodlayers, Auto-updates disabled
    Goodlayers Importer: version: 1.0.3, author: Goodlayers, Auto-updates disabled wp-media image_editor: WP_Image_Editor_Imagick
    imagick_module_version: 1690
    imagemagick_version: ImageMagick 6.9.10-23 Q16 x86_64 20190101 https://imagemagick.org
    imagick_version: 3.7.0
    file_uploads: 1
    post_max_size: 128M
    upload_max_filesize: 128M
    max_effective_size: 128 MB
    max_file_uploads: 50
    imagick_limits:
    imagick::RESOURCETYPE_AREA: 122 MB
    imagick::RESOURCETYPE_DISK: 1073741824
    imagick::RESOURCETYPE_FILE: 786432
    imagick::RESOURCETYPE_MAP: 512 MB
    imagick::RESOURCETYPE_MEMORY: 256 MB
    imagick::RESOURCETYPE_THREAD: 1
    imagick::RESOURCETYPE_TIME: 1.844674407371E+19
    imagemagick_file_formats: 3FR, 3G2, 3GP, AAI, AI, ART, ARW, AVI, AVS, BGR, BGRA, BGRO, BIE, BMP, BMP2, BMP3, BRF, CAL, CALS, CANVAS, CAPTION, CIN, CIP, CLIP, CMYK, CMYKA, CR2, CRW, CUR, CUT, DATA, DCM, DCR, DCX, DDS, DFONT, DJVU, DNG, DOT, DPX, DXT1, DXT5, EPDF, EPI, EPS, EPS2, EPS3, EPSF, EPSI, EPT, EPT2, EPT3, ERF, EXR, FAX, FILE, FITS, FRACTAL, FTP, FTS, G3, G4, GIF, GIF87, GRADIENT, GRAY, GRAYA, GROUP4, GV, H, HALD, HDR, HEIC, HISTOGRAM, HRZ, HTM, HTML, HTTP, HTTPS, ICB, ICO, ICON, IIQ, INFO, INLINE, IPL, ISOBRL, ISOBRL6, JBG, JBIG, JNG, JNX, JPE, JPEG, JPG, JPS, JSON, K25, KDC, LABEL, M2V, M4V, MAC, MAGICK, MAP, MASK, MAT, MATTE, MEF, MIFF, MKV, MNG, MONO, MOV, MP4, MPC, MPEG, MPG, MRW, MSL, MSVG, MTV, MVG, NEF, NRW, NULL, ORF, OTB, OTF, PAL, PALM, PAM, PANGO, PATTERN, PBM, PCD, PCDS, PCL, PCT, PCX, PDB, PDF, PDFA, PEF, PES, PFA, PFB, PFM, PGM, PGX, PICON, PICT, PIX, PJPEG, PLASMA, PNG, PNG00, PNG24, PNG32, PNG48, PNG64, PNG8, PNM, PPM, PREVIEW, PS, PS2, PS3, PSB, PSD, PTIF, PWP, RADIAL-GRADIENT, RAF, RAS, RAW, RGB, RGBA, RGBO, RGF, RLA, RLE, RMF, RW2, SCR, SCT, SFW, SGI, SHTML, SIX, SIXEL, SPARSE-COLOR, SR2, SRF, STEGANO, SUN, SVG, SVGZ, TEXT, TGA, THUMBNAIL, TIFF, TIFF64, TILE, TIM, TTC, TTF, TXT, UBRL, UBRL6, UIL, UYVY, VDA, VICAR, VID, VIFF, VIPS, VST, WBMP, WEBP, WMF, WMV, WMZ, WPG, X, X3F, XBM, XC, XCF, XPM, XPS, XV, XWD, YCbCr, YCbCrA, YUV
    gd_version: bundled (2.1.0 compatible)
    gd_formats: GIF, JPEG, PNG, WebP, BMP, XPM
    ghostscript_version: unknown wp-server server_architecture: Linux 5.4.0-128-generic x86_64
    httpd_software: Apache
    php_version: 8.2.13 64bit
    php_sapi: fpm-fcgi
    max_input_variables: 3000
    time_limit: 900
    memory_limit: 1024M
    max_input_time: 60
    upload_max_filesize: 128M
    php_post_max_size: 128M
    curl_version: 7.68.0 OpenSSL/1.1.1f
    suhosin: false
    imagick_availability: true
    pretty_permalinks: true
    htaccess_extra_rules: false
    current: 2024-02-12T11:50:32+00:00
    utc-time: Monday, 12-Feb-24 11:50:32 UTC
    server-time: 2024-02-12T12:50:30+01:00 wp-database extension: mysqli
    server_version: 8.0.32-24
    client_version: mysqlnd 8.2.13
    max_allowed_packet: 67108864
    max_connections: 10000 wp-constants WP_HOME: undefined
    WP_SITEURL: undefined
    WP_CONTENT_DIR: /web/htdocs/www.lucentumrooms.it/home/wp-content
    WP_PLUGIN_DIR: /web/htdocs/www.lucentumrooms.it/home/wp-content/plugins
    WP_MEMORY_LIMIT: 40M
    WP_MAX_MEMORY_LIMIT: 1024M
    WP_DEBUG: true
    WP_DEBUG_DISPLAY: false
    WP_DEBUG_LOG: true
    SCRIPT_DEBUG: true
    WP_CACHE: false
    CONCATENATE_SCRIPTS: undefined
    COMPRESS_SCRIPTS: undefined
    COMPRESS_CSS: undefined
    WP_ENVIRONMENT_TYPE: Undefined
    WP_DEVELOPMENT_MODE: undefined
    DB_CHARSET: utf8mb4
    DB_COLLATE: undefined wp-filesystem wordpress: writable
    wp-content: writable
    uploads: writable
    plugins: writable
    themes: writable pll_options browser: 1: Detect browser language activated
    rewrite: 1: Remove /language/ in pretty permalinks
    hide_default: 1: Hide URL language information for default language
    force_lang: 1: The language is set from the directory name in pretty permalinks
    redirect_lang: 1: The front page URL contains the language code instead of the page name or page id
    media_support: 1: The media are translated
    sync: 0: Synchronization disabled
    post_types: post, page, wp_block, attachment, portfolio, room, service, elementor_library, e-landing-page
    taxonomies: category, post_tag, portfolio_tag, portfolio_category, page_category
    version: 3.5.3
    default_lang: en
    main_menu: en => 55 | it => 107 pll_language_en name: English
    slug: en
    term_group: 0
    term_id: 62
    locale: en_GB
    is_rtl: 0
    w3c: en-GB
    facebook: en_GB
    home_url: https://www.lucentumrooms.it/
    search_url: https://www.lucentumrooms.it/
    page_on_front: 5330
    page_for_posts: 0
    flag_code: gb
    flag_url: https://www.lucentumrooms.it/wp-content/plugins/polylang/flags/gb.png
    custom_flag_url: 0
    active: true
    fallbacks: 0
    is_default: true
    term_props:
    language/term_id: 62
    language/term_taxonomy_id: 62
    language/count: 210
    term_language/term_id: 63
    term_language/term_taxonomy_id: 63
    term_language/count: 39 pll_language_it name: Italiano
    slug: it
    term_group: 1
    term_id: 59
    locale: it_IT
    is_rtl: 0
    w3c: it-IT
    facebook: it_IT
    home_url: https://www.lucentumrooms.it/it/
    search_url: https://www.lucentumrooms.it/it/
    page_on_front: 5684
    page_for_posts: 0
    flag_code: it
    flag_url: https://www.lucentumrooms.it/wp-content/plugins/polylang/flags/it.png
    custom_flag_url: 0
    active: true
    fallbacks: 0
    is_default: 0
    term_props:
    language/term_id: 59
    language/term_taxonomy_id: 59
    language/count: 2
    term_language/term_id: 60
    term_language/term_taxonomy_id: 60
    term_language/count: 1 pll_warnings wpml:
    themes/hotelmaster: /web/htdocs/www.lucentumrooms.it/home/wp-content/themes/hotelmaster/wpml-config.xml

    Can you please help me understand what is happening?

    Thanks very much.
    Best regards,
    .S.

    The page I need help with: [log in to see the link]

  • The topic ‘Issues with language switcher’ is closed to new replies.