Text editing in wordpress php files not working

by Sisqo
6 replies
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
#editing #files #php #text #wordpress #working
  • Profile picture of the author orb
    Going to need more details, like a snippet of the code you are changing.
    {{ DiscussionBoard.errors[5791057].message }}
    • Profile picture of the author Sisqo
      Originally Posted by orb View Post

      Going to need more details, like a snippet of the code you are changing.
      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');"
      {{ DiscussionBoard.errors[5791071].message }}
  • Profile picture of the author orb
    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.
    {{ DiscussionBoard.errors[5791096].message }}
    • Profile picture of the author Sisqo
      Originally Posted by orb View Post

      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.
      great!! I'm using a plugin to change database, [GWA] db Editor, and this is working..THANKS
      {{ DiscussionBoard.errors[5791233].message }}
  • Profile picture of the author Earnie Boyd
    @Sisqo, you might want to check into a CMS known as Drupal. It has full localization built into it from the start.
    Signature
    {{ DiscussionBoard.errors[5794605].message }}
    • Profile picture of the author BlueLayerHost
      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.
      Signature
      BlueLayerHost - Shared + Managed VPS Hosting
      BlueLayerMedia - Web Development
      WPMalware - Resource for WordPress Seurity + Exploits
      {{ DiscussionBoard.errors[5796393].message }}

Trending Topics