numbers are shown in persian digits
-
Hi
i have a persian website which contains some words in english ( for example product names which must be in english ).
how can we force numbers be shown with english digits ?after updating wordpress to lates version, all numbers in titles & body of the site are shown with persian digits which has made the site ugly.
i checked my language plugin & all settings which convert english digits to persian digits are disabled. i checked all settings all over the wordpress dashboard & no settings related to such issue.
thank in advanced
-
Are you using WooCommerce? If so, I recommend asking at https://wordpress.org/support/plugin/woocommerce#new-post so the plugin’s developers and support community can help you with this.
Hi Steven
thanks for your answer
Yes i use WooCommerce but i don’t think the issue be related to WooCommerce since this problem exists all over my website for example in Posts (which is not related to wWooCommerce.
i thoughtPast maybe it be related to Visual composer but i checks the posts (article) which i hadn’t created them using visual composer and problem exists about those posts as well.
i believe this problem occurred after updating WordPress to latest versionPlease provide a link to a page on your site where we can see this. Thanks.
I can’t find any plugins which override the site’s language preference for digit formatting.
@nmm4829 could you tell us what theme and what plugins you’re using?
I believe WooCommerce has a tab that collects some of this information in a convenient format, but you can also use https://wordpress.org/plugins/health-checkIf you, for instance, happen to be using the plugin https://wordpress.org/plugins/wp-jalali/ then you might want to dive into the configuration file /wp-includes/plugins/wp-jalali-config.php
Hi thanks.
unfortunately the site is not publicly accessible so i can’t share a link to it.i am using latest version of Kutshop theme and some plugins such as WPBakery Page Builder and woocommerce and etc.
but non of plugins are related to sites’ language.i am using parsi-date plugin as language plugin.
would you please guide me what to check in wp-parsidate.php file ?
i remind that in WordPress dashboard environment, in plugin settings page, i have disabled all settings which convert English digits to Persian digits, but no effect.
if ( ! defined( 'ABSPATH' ) ) { exit; } // No direct access allowed final class WP_Parsidate { /** * @var WP_Parsidate Class instance */ public static $instance = null; private function __construct() { $this->define_const(); $this->setup_vars(); $this->include_files(); add_filter( 'plugin_action_links_' . plugin_basename( __FILE__ ), array( $this, 'parsi_settings_link' ) ); add_action( 'widgets_init', array( $this, 'register_widget' ) ); add_action( 'wp_dashboard_setup', 'wpp_add_dashboard_widgets' ); } /** * Sets up constants for plugin * * @since 2.0 * @return void */ private function define_const() { if ( ! defined( 'WP_PARSI_ROOT' ) ) { define( 'WP_PARSI_ROOT', __FILE__ ); } if ( ! defined( 'WP_PARSI_DIR' ) ) { define( 'WP_PARSI_DIR', plugin_dir_path( WP_PARSI_ROOT ) ); } if ( ! defined( 'WP_PARSI_URL' ) ) { define( 'WP_PARSI_URL', plugin_dir_url( WP_PARSI_ROOT ) ); } if ( ! defined( 'WP_PARSI_VER' ) ) { define( 'WP_PARSI_VER', '2.2' ); } } /** * Sets up global variables * * @since 2.0 * @return void */ private function setup_vars() { global $persian_month_names; $persian_month_names = array( '', 'فروردین', 'اردیبهشت', 'خرداد', 'تیر', 'مرداد', 'شهریور', 'مهر', 'آبان', 'آذر', 'دی', 'بهمن', 'اسفند' ); } /** * Includes files for plugin * * @since 2.0 * @return void */ public function include_files() { require_once( WP_PARSI_DIR . 'includes/settings.php' ); global $wpp_settings; $wpp_settings = wp_parsi_get_settings(); $files = array( 'parsidate', 'general', 'fixes-archive', 'fixes-permalinks', 'fixes-dates', 'fixes-misc', 'admin/styles-fix', 'admin/lists-fix', 'admin/widgets', 'fixes-calendar', 'fixes-archives', 'plugins/woocommerce', 'plugins/edd', 'widget/widget_archive', 'widget/widget_calendar' ); foreach ( $files as $file ) { require_once( WP_PARSI_DIR . 'includes/' . $file . '.php' ); } if ( get_locale() == 'fa_IR' ) { load_textdomain( 'wp-parsidate', WP_PARSI_DIR . 'languages/fa_IR.mo' ); } } /** * Returns an instance of WP_Parsidate class, makes instance if not exists * * @since 2.0 * @return WP_Parsidate Instance of WP_Parsidate */ public static function get_instance() { if ( self::$instance == null ) { self::$instance = new WP_Parsidate(); } return self::$instance; } /** * Add Setting Link To Install Plugin * * @param array $links * * @return array */ public static function parsi_settings_link( $links ) { $settings_link = array( '<a href="' . menu_page_url( 'wp-parsi-settings', false ) . '">' . __( 'settings', 'wp-parsidate' ) . '</a>' ); return array_merge( $links, $settings_link ); } /** * Register Plugin Widgets * * @since 2.0 * @return boolean */ public function register_widget() { register_widget( 'parsidate_archive' ); register_widget( 'parsidate_calendar' ); return true; } } return WP_Parsidate::get_instance();
-
This reply was modified 6 years, 3 months ago by
Steven Stern (sterndata).
So, one of the functions the description of this plugin lists is:
Poweful and fast function for Persian numbersI don’t speak Persian, so I guess I can’t help you too much here.
Check if there are any settings for this plugin.
If not, I’d suggest that you ask in the forum for this specific plugin: https://wordpress.org/support/plugin/wp-parsidateok thanks a lot
-
This reply was modified 6 years, 3 months ago by
- The topic ‘numbers are shown in persian digits’ is closed to new replies.