PHP error 'WPLANG' - assumed 'WPLANG'

Asked

Viewed 201 times

-1

Good evening. I am beginner in PHP Wordpress development. I downloaded a site in WP PHP to make changes, so when calling on the localhost, I get the following message: Warning: Use of Undefined Constant 'WPLANG' - assumed ''WPLANG'' (this will throw an Error in a Future version of PHP) in C: xampp htdocs novosite wp-config.php on line 75

I’ve looked on line 75 and didn’t understand the problem. you could help me?

  • 1

    Saying what the error is without the code is a bit difficult, but this type of alert is typical of when you try to use a variable without the dollar sign. In this case, if no constant with the name is found WPLANG, PHP searches for the name variable $WPLANG and leave the warning. If you wanted to use a constant, make sure PHP can access it, if you wanted to use a variable, add the dollar sign in the name.

1 answer

0


Without reading your code, I can’t help you. The most I can do is assume a scenario based on the error message where on line 75 of your code has something like this:

define ('WPLANG', 'Aqui_está_o_erro!');

So if you have the language definition Portuguese Brazil installed, to correct an error supposedly based on a hypothetical scenario would be:

define ('WPLANG', 'pt_BR');

If you do not have the language definition Portuguese Brazil installed then to correct an error supposedly based on a hypothetical scenario would be:

define ('WPLANG', 'en_US');

But this is speculation based on the error message. Now when you publish the source with the error I can safely say which error and which solution.

  • Hello Augusto, Good night! This is the mistake you are making. 

Warning: Use of undefined constant ’WPLANG’ - assumed '’WPLANG’' (this will throw an Error in a future version of PHP) in C:\xampp\htdocs\novosite\wp-config.php on line 75

Warning: Use of undefined constant ‘en_US’ - assumed '‘en_US’' (this will throw an Error in a Future version of PHP) in C: xampp htdocs novosite wp-config.php on line 75 .

  • @Rodrigojúlio Comment on this line and Compile. #define ('WPLANG', 'pt_Br');

  • commented and continues blank... I downloaded this ftp file and gave some xabus. I see I have to download again.

  • It caught my eye Use of Undefined Constant ːen_US' - assumed '?en_US''. It seems that no language package is installed. Nor is en_US standard. It seems that it is corrupted.

  • 1

    got it! I’m going to download the file again because I think I haven’t downloaded everything. Thanks a lot for the help.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.