تخطَّ إلى المحتوى

glot لـ WooCommerce

التجارة الإلكترونية · إضافة

يُثبَّت glot في WooCommerce على شكل إضافة. تشرح الخطوات أدناه إعدادها.

خطوات المنصة مكتوبة بالإنجليزية، بأسماء القوائم كما تظهر في واجهة WooCommerce.

تثبيت إضافة glot

  1. Download glot.zip (built from integrations/wordpress-plugin in the glot repository; it isn't on WordPress.org yet). It needs WordPress 6.1+ and PHP 7.4+.
  2. In WordPress, go to Plugins → Add New → Upload Plugin, upload glot.zip and activate it.
  3. Open Settings → glot and enter your project slug, your public key (pk_…, never a secret glot_… key), the source language and your languages, then save. The plugin adds glot.js to every front-end page.
  4. Optional: place the language switcher with the [glot_switcher] shortcode, the glot language switcher widget or block, or the Elementor widget; otherwise it sits in the corner you picked.
  5. WooCommerce: cart, checkout and account forms are never read; customer details on order and address pages are marked so they are never translated or reported.
  6. Optional: for translated URLs, set up glot Edge (subdomain or subdirectory) and choose it as the SEO mode, so the plugin adds hreflang links to the Edge pages.
  7. Optional: click Connect to glot with a glot API token to link the WordPress connector, so translations are also written into Polylang Pro or WPML posts.
الوثائق الكاملة للموصّل

بديل: الوسم العام

لترجمة ما لا يغطيه تكامل WooCommerce داخل المتصفح، أضف الوسم العام بدلًا من ذلك.

  1. في glot، أنشئ مشروعًا وأضف لغاتك.
  2. افتح glot Edge ← وسم الموقع وأدخل عنوان موقعك: يترجمه glot ويعرض عليك معاينة. بعد لصق الوسم، تحقق من التثبيت في المكان نفسه ثم فعّل الوسم.
  3. انسخ وسمك من ذلك التبويب: فهو يتضمن مشروعك ومفتاحه العام (data-key). يوضح الوسم أدناه شكله.
وسم glot
<script src="https://app.glotlang.com/widget/glot.js" data-project="your-project" data-key="pk_…" async></script>
  1. Do not edit the parent theme's files: theme updates overwrite them.
  2. Either install a plugin that lets you add custom code (for example Code Snippets), or create a child theme.
  3. In the child theme's functions.php (or a new snippet), hook a function on wp_head that echoes the glot tag.
  4. Save or activate the snippet and clear any caching plugin.
  5. Open your store in a private window and check that the language menu appears.
دليل وسم الموقع

الخطط المطلوبة

WooCommerce is self-hosted and free; any WordPress install where you can add plugins or edit a child theme can add the tag. On managed WordPress.com, plugins require a plan that allows them.

من جهة glot، راجع صفحة الأسعار لمعرفة ما تتضمنه كل خطة. glot Edge (الروابط المترجمة) جزء من خطة Growth، مع تجربة محدودة في Pro.

روابط مترجمة لمحركات البحث

للحصول على صفحات مترجمة تفهرسها محركات البحث دون تشغيل JavaScript، ضع glot Edge على نطاق فرعي من نطاقك (es.example.com) بسجلّي DNS:

سجلات DNS (يظهر رمز TXT في glot Edge ← الإعداد)
es.example.com.        CNAME  edge.glotlang.com.
_glot.es.example.com.  TXT    "<token shown in the dashboard>"

Add the CNAME and TXT wherever your domain's DNS is hosted (registrar, hosting provider or DNS service). You control your own domain on a self-hosted store.

كيف يعمل glot Edge

أسئلة

هل glot شريك لـ WooCommerce؟
لا. glot مستقل، وليس تابعًا لـ WooCommerce ولا معتمدًا منه. يستخدم هذا الدليل ميزات WooCommerce القياسية فقط.
هل يغيّر glot محتواي على WooCommerce؟
يبقى محتواك الأصلي كما هو. تترجم الإضافة الصفحات في المتصفح، وعند ربطها تكتب الترجمات في حقول لغات تراجعها قبل النشر.
هل ستفهرس محركات البحث ترجماتي؟
ليس بالوسم وحده: فهو يترجم في المتصفح، لذا تفهرس محركات البحث لغتك الأصلية في الغالب. تحتاج الصفحات المترجمة ذات الروابط الخاصة إلى glot Edge أو إلى منصة تنشر كل لغة على رابط خاص بها.
Should I paste the tag in the theme editor's header.php?
Not in the parent theme: an update erases it. WooCommerce's docs recommend a child theme's functions.php or a code-snippets plugin.
Does it work on the block checkout and cart?
The tag runs on every page that prints wp_head, including cart and checkout pages of standard themes.

الوثائق الرسمية لـ WooCommerce

ترجم موقعك على WooCommerce

أنشئ مشروعًا واختر لغاتك واتبع الخطوات أعلاه.

WooCommerce علامة تجارية لمالكها. glot ليس تابعًا لـ WooCommerce.