Text editing in wordpress php files not working

by 6 replies
7
Dear warriors,
some days ago I bought a wordpress theme. I'm translating it into my language by editing php files. Everything was going well, BUT some text donsen't change.

I mean, I find the php containing the text I want to change, I change it, but the text in the theme remains the same like berfore, not translated.

Can you please help me with this?

ps. sorry, I'm not english native
#programming #editing #files #php #text #wordpress #working
  • Going to need more details, like a snippet of the code you are changing.
    • [1] reply
    • It's a file of wp ecommerce plugin. The file is wpsc-installer. I'm trying to edit the form's text. First name, last name, and so on...

      PHP Code:
      /**
       * wpsc_add_checkout_fields function,    converts values to decimal to satisfy mySQL strict mode
       * * @return boolean true on success, false on failure
       */
      function wpsc_add_checkout_fields() {
          global ;
           = ( 
      "SELECT COUNT(*) AS `count` FROM `" WPSC_TABLE_CHECKOUT_FORMS "`"ARRAY_A );

          if ( isset(  ) && [
      'count'] == ) {

               = 
      " INSERT INTO `" WPSC_TABLE_CHECKOUT_FORMS "` ( `name`, `type`, `mandatory`, `display_log`, `default`, `active`, `checkout_order`, `unique_name`) VALUES ( '" __'Your billing/contact details''wpsc' ) . "', 'heading', '0', '0', '', '1', 1,''),
          ( '" 
      __'First Name''wpsc' ) . "', 'text', '1', '1', '', '1', 2,'billingfirstname'),
          ( '" 
      __'Last Name''wpsc' ) . "', 'text', '1', '1', '', '1', 3,'billinglastname'),
          ( '" 
      __'Address''wpsc' ) . "', 'address', '1', '0', '', '1', 4,'billingaddress'),
          ( '" 
      __'City''wpsc' ) . "', 'city', '1', '0', '', '1', 5,'billingcity'),
          ( '" 
      __'State''wpsc' ) . "', 'text', '0', '0', '', '1', 6,'billingstate'),
          ( '" 
      __'Country''wpsc' ) . "', 'country', '1', '0', '', '1', 7,'billingcountry'),
          ( '" 
      __'Postal Code''wpsc' ) . "', 'text', '0', '0', '', '1', 8,'billingpostcode'),
          ( '" 
      __'Email''wpsc' ) . "', 'email', '1', '1', '', '1', 9,'billingemail'),
          ( '" 
      __'Shipping Address''wpsc' ) . "', 'heading', '0', '0', '', '1', 10,'delivertoafriend'),
          ( '" 
      __'First Name''wpsc' ) . "', 'text', '0', '0', '', '1', 11,'shippingfirstname'),
          ( '" 
      __'Last Name''wpsc' ) . "', 'text', '0', '0', '', '1', 12,'shippinglastname'),
          ( '" 
      __'Address''wpsc' ) . "', 'address', '0', '0', '', '1', 13,'shippingaddress'),
          ( '" 
      __'City''wpsc' ) . "', 'city', '0', '0', '', '1', 14,'shippingcity'),
          ( '" 
      __'State''wpsc' ) . "', 'text', '0', '0', '', '1', 15,'shippingstate'),
          ( '" 
      __'Country''wpsc' ) . "', 'delivery_country', '0', '0', '', '1', 16,'shippingcountry'),
          ( '" 
      __'Postal Code''wpsc' ) . "', 'text', '0', '0', '', '1', 17,'shippingpostcode');"
  • I'm not that knowledgeable about MySQL and PHP but I think it's not changing because the database fields in the database are still in English.
    • [1] reply
    • great!! I'm using a plugin to change database, [GWA] db Editor, and this is working..THANKS
  • @Sisqo, you might want to check into a CMS known as Drupal. It has full localization built into it from the start.
    • [1] reply
    • What was mentioned above is correct, those are not form fields, those are database field names. Editing those won't change what is displayed on the site.

Next Topics on Trending Feed