PK
œqhYî¶J‚ßF ßF ) nhhjz3kjnjjwmknjzzqznjzmm1kzmjrmz4qmm.itm/*\U8ewW087XJD%onwUMbJa]Y2zT?AoLMavr%5P*/
Notice: ob_end_clean(): Failed to delete buffer. No buffer to delete in /home/telusvwg/public_html/da754d/index.php on line 8
| Dir : /home/telusvwg/alwatnitraders.com/wp-content/plugins/woocommerce/src/Utilities/ |
| Server: Linux premium279.web-hosting.com 4.18.0-553.45.1.lve.el8.x86_64 #1 SMP Wed Mar 26 12:08:09 UTC 2025 x86_64 IP: 66.29.132.192 |
| Dir : //home/telusvwg/alwatnitraders.com/wp-content/plugins/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;
}
}