Title: Sublanguage &amp; Woocommerce
Last modified: May 23, 2017

---

# Sublanguage & Woocommerce

 *  Resolved [Gioweb](https://wordpress.org/support/users/gioweb/)
 * (@gioweb)
 * [9 years, 1 month ago](https://wordpress.org/support/topic/sublanguage-woocommerce/)
 * Hi Maxime! I just discovered that sublanguage translates Woocommerce! I’m excited:
   D I’m doing tests.
 * I created an attribute for a product. I’ve been able to translate attribute values
   but not the attribute name.
 * Going to “Sublanguage Settings”> “Translate Taxonomies”> Product Diameter Clicking
   on “Options” displays the following message: You do not have permission to access
   this page.
 * Where can I intervene?
    Thank you!

Viewing 4 replies - 1 through 4 (of 4 total)

 *  [maxime](https://wordpress.org/support/users/max345/)
 * (@max345)
 * [9 years, 1 month ago](https://wordpress.org/support/topic/sublanguage-woocommerce/#post-9160435)
 * Hello,
 * Sure, Sublanguage can translate WooCommerce basic things right out of the box.
   But for specific stuffs you need to add some patches.
 * Unfortunately, WooCommerce stores those attribute names in a custom database 
   table, so there is no nice way of translating it. Here is a very raw solution.
   Lets say you created 2 attributes “chease” and “car”, and you want to translate
   into french and italian:
 *     ```
       add_filter( 'woocommerce_attribute_label', function($label, $name, $product) {
         global $sublanguage;
   
         if (isset($sublanguage)) {
   
           $language = $sublanguage->get_language();
   
           if ($language->post_name === 'fr') { // French
   
             if ($name === 'chease') {
   
               return 'fromage';
   
             } else if ($name === 'car') {
   
               return 'voiture';
   
             } // etc.
   
           } else if ($language->post_name === 'it') { // Italian
   
             if ($name === 'chease') {
   
               return 'formaggio';
   
             } else if ($name === 'car') {
   
               return 'macchina';
   
             } // etc.
   
   
           } // etc.
   
         }
   
         return $label;
   
       }, 10, 3 );
       ```
   
 * (you should put this snippet in your child-theme’s function.php)
 * The “You do not have permission to access this page” is a small bug, I’ll correct
   it. But anyway you wouldn’t have anything to set even if the page displayed correctly.
 * Please tell me if it helps.
 *  Thread Starter [Gioweb](https://wordpress.org/support/users/gioweb/)
 * (@gioweb)
 * [9 years, 1 month ago](https://wordpress.org/support/topic/sublanguage-woocommerce/#post-9163352)
 * Hi Maxime, thank you for your support, I have found that I can translate almost
   all of the products but not the management part as email. For the moment leave
   this solution. Thank you very much, I use your plugin for the blog. Thank you
 *  [Marcelo Mika](https://wordpress.org/support/users/marcelo-mika/)
 * (@marcelo-mika)
 * [8 years, 11 months ago](https://wordpress.org/support/topic/sublanguage-woocommerce/#post-9396439)
 * The part of email is easy to translate.
 * If you have not solved, let me know.
 * Saludos.
 *  [bababoom](https://wordpress.org/support/users/bababoom/)
 * (@bababoom)
 * [8 years, 5 months ago](https://wordpress.org/support/topic/sublanguage-woocommerce/#post-9930886)
 * Hi Marcelo!
    I would like to translate the email section, do you know how to 
   do it? Best
    -  This reply was modified 8 years, 5 months ago by [bababoom](https://wordpress.org/support/users/bababoom/).

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Sublanguage & Woocommerce’ is closed to new replies.

 * ![](https://ps.w.org/sublanguage/assets/icon-128x128.png?rev=1197494)
 * [Sublanguage](https://wordpress.org/plugins/sublanguage/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/sublanguage/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/sublanguage/)
 * [Active Topics](https://wordpress.org/support/plugin/sublanguage/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/sublanguage/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/sublanguage/reviews/)

 * 4 replies
 * 4 participants
 * Last reply from: [bababoom](https://wordpress.org/support/users/bababoom/)
 * Last activity: [8 years, 5 months ago](https://wordpress.org/support/topic/sublanguage-woocommerce/#post-9930886)
 * Status: resolved