currency-switcher
3 weeks ago
multi-currency
3 weeks ago
setup
3 weeks ago
status
3 weeks ago
store-urls
3 weeks ago
class-wcml-currencies-dropdown-ui.php
5 years ago
class-wcml-custom-files-ui.php
3 weeks ago
class-wcml-languages-upgrade-notice.php
4 years ago
class-wcml-menus-wrap-base.php
3 weeks ago
class-wcml-menus-wrap.php
3 weeks ago
class-wcml-multilingual-ui.php
9 months ago
class-wcml-not-translatable-attributes.php
3 weeks ago
class-wcml-pointer-ui.php
1 year ago
class-wcml-removed-cart-items-ui.php
3 weeks ago
class-wcml-settings-ui.php
3 weeks ago
class-wcml-st-taxonomy-ui.php
11 months ago
class-wcml-sync-taxonomy.php
3 weeks ago
class-wcml-templates-factory.php
3 weeks ago
class-wcml-troubleshooting-ui.php
3 weeks ago
class-wcml-multilingual-ui.php
56 lines
| 1 | <?php |
| 2 | |
| 3 | class WCML_Multilingual_UI extends WCML_Templates_Factory { |
| 4 | |
| 5 | public function get_model() { |
| 6 | return [ |
| 7 | 'menu' => [ |
| 8 | 'translation' => [ |
| 9 | 'title' => __( 'Translate Products', 'woocommerce-multilingual' ), |
| 10 | 'description' => esc_html__( 'Go to WPML → Translation Management to translate Products', 'woocommerce-multilingual' ), |
| 11 | 'icon' => 'otgs-ico-basket', |
| 12 | 'button' => [ |
| 13 | 'url' => \WCML\Utilities\AdminUrl::getWPMLTMDashboardProducts(), |
| 14 | 'label' => __( 'Translate Products', 'woocommerce-multilingual' ), |
| 15 | ], |
| 16 | ], |
| 17 | 'taxonomy' => [ |
| 18 | 'title' => __( 'Translate Taxonomy', 'woocommerce-multilingual' ), |
| 19 | 'description' => esc_html__( 'Go to WPML → Taxonomy Translation to translate Taxonomy terms manually', 'woocommerce-multilingual' ), |
| 20 | 'icon' => 'otgs-ico-tag', |
| 21 | 'button' => [ |
| 22 | 'url' => \WCML\Utilities\AdminUrl::getWPMLTaxonomyTranslation(), |
| 23 | 'label' => __( 'Translate Taxonomy', 'woocommerce-multilingual' ), |
| 24 | ], |
| 25 | ], |
| 26 | ], |
| 27 | 'translate_manually' => [ |
| 28 | 'toggle_text' => __( 'Prefer to translate manually?', 'woocommerce-multilingual' ), |
| 29 | 'products' => sprintf( |
| 30 | /* translators: %1$s and %2$s are opening and closing HTML link tags */ |
| 31 | __( 'To manually translate products, go to %1$sProducts%2$s and click on the "plus" icon.', 'woocommerce-multilingual' ), |
| 32 | '<a href="' . \WCML\Utilities\AdminUrl::getWooProductAll() . '">', |
| 33 | '</a>' |
| 34 | ), |
| 35 | 'product_categories' => sprintf( |
| 36 | /* translators: %1$s and %2$s are opening and closing HTML link tags */ |
| 37 | __( 'To manually translate product categories, tags and attributes, go to %1$sWPML → Taxonomy Translation%2$s.', 'woocommerce-multilingual' ), |
| 38 | '<a href="' . \WCML\Utilities\AdminUrl::getWPMLTaxonomyTranslation() . '">', |
| 39 | '</a>' |
| 40 | ), |
| 41 | ], |
| 42 | ]; |
| 43 | } |
| 44 | |
| 45 | protected function init_template_base_dir() { |
| 46 | $this->template_paths = [ |
| 47 | WCML_PLUGIN_PATH . '/templates/multilingual/', |
| 48 | ]; |
| 49 | } |
| 50 | |
| 51 | public function get_template() { |
| 52 | return 'multilingual.twig'; |
| 53 | } |
| 54 | |
| 55 | } |
| 56 |