Making WordPress.org


Ignore:
Timestamp:
03/27/2023 10:54:49 PM (3 years ago)
Author:
coffee2code
Message:

Browse Happy: Use localized domain for Chrome when locale is zh_CN.

Note: This has actually been in production since at least 2021.

This isn't an ideal solution given that someone preferring Chinese isn't necessarily in China and thus bound by their internet restrictions. Unfortunately, the site does not currently perform location detection at this time. But this change has yielded no complaints unlike the previous implementation.

Fixes https://github.com/WordPress/browsehappy/issues/40.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/browsehappy.com/public_html/functions.php

    r12487 r12501  
    2121            'normalized' => 1, // just first number
    2222            'facebook' => 'googlechrome',
    23             'url' => 'https://www.google.com/chrome',
     23            'url' => class_exists( 'Browse_Happy_Locale' ) && 'zh_CN' === Browse_Happy_Locale::locale() ? 'https://www.google.cn/chrome' : 'https://www.google.com/chrome',
    2424            'info' => ( $latest_strings ?
    2525                __( '“Get more done with the new Google Chrome. A more simple, secure, and faster web browser than ever, with Google’s smarts built-in.”', 'browsehappy' )
Note: See TracChangeset for help on using the changeset viewer.