Phrases language in JavaScript Print

  • 0

Graphic templates applications together with scripts, the main load to the map Shop. lang {} phrase for the language in which you browsing the store. By default, this is the/public/scripts/lang/pl_PL.js file. Phrases are divided into groups according to the function:

  • common
    • product_vote_alert : „Error sending voice” (When a vote is taken on the product)
    • product_stock_select : ”(Select)” (<select> product variants, null)
    • product_stock_download_error : „Error retrieving product” (When you change the variant)
    • product_select_stock : „Select the product option” (When you try to add to cart)
  • cart
    • address_request_error : „Error retrieving URL” (<select> user addresses)
    • shipping_different_country : „The country of the address data is not supported by the selected form of delivery. You must provide the a different address for delivery.”
  • skinpreview
    • close : „Close the preview style” (Preview called in the Administration Panel)
  • milkbox
    • x_of_y : „z” (X „z” Y product photos in the Gallery)
    if($chk(window.Shop)
    
        &&
        
        $chk
        (window.Shop.lang))
        
            {
            
            Shop.
            lang.skinpreview
            =
            {
            close
            :
            "Close the preview style"
            }
            }

The first condition controls whether object and attribute Shop. lang {} there, in order to avoid errors. In the course of action code, depending on the decision of the programmer, the phrase may be overridden by the other.

In order to create your own translation, the administrator should copy one of the existing ones, make the appropriate changes and call the file in accordance with the code of the country.


Was this answer helpful?

« Back