PDA

View Full Version : Change language by overwriting existing files



drdentz
07-18-2005, 07:27 AM
Hi Ppl,

I still have the problem, that the page isn't in german yet. I started translating the whole lang.inc.php but it's damn much.
So i thought i could make a little trick. I only translated some textparts which are important, because you can see it on the main page and the whole admin thing I didn't started translate for real.

I did all the steps wich are given in the FAQ: How to install new language files. (http://wiki.open-realty.org/index.php/How_to_translate_Open-Realty_into_a_different_language) Because of the fact I didn't want to do a complete reinstall of OR because I edited many things in the form editor and so on, I decided to choose the "Update URLS and Path only" but the Page is still in English allthought i have choosen the German language. And an German language file exists - Not all phrases are in English but thats not important (that's my opinion).

Because this way, the reinstallation didn't work i thought i could do a little trick: I did simply overwrite the existing English language file with the german one, and OR will use the "English" File allthougt its german - That was the plan.

But when i overwrite the english file (made a backup :)) i got an error:

Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /usr/export/www/vhosts/funnetwork/hosting/azeller/zeller1/include/language/en/lang.inc.php on line 83

In Line 83 there is:

$lang['admin_page_editor'] = "Seiten Editor";
$lang['admin_password'] = "Passwort";
$lang['admin_template'] = "Administrationsoberfläche";

[Line 83 is that one with the admin_page_editor]

I can't understand how this might happen because the german file has the same structure like the original English one. And it didn't worked too, when i copied the original line from the English file into the German one.

Can you guys help me?

- Can you say me, how to install a new languagefile, but without loosing existing data in the database, so i don't have to edit and customize the whole settings.
- Can you say me whats the problem in the language file.

Thanks a lot!

the_sandking
07-18-2005, 09:56 AM
Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /usr/export/www/vhosts/funnetwork/hosting/azeller/zeller1/include/language/en/lang.inc.php on line 83

In Line 83 there is:

$lang['admin_page_editor'] = "Seiten Editor";
$lang['admin_password'] = "Passwort";
$lang['admin_template'] = "Administrationsoberfläche";



The problem most likely occurs right before line 83, you have some whitespace (a blank space) or other invalid character inserted somewhere. This could also be a simple missing " or ; character.

drdentz
07-18-2005, 03:12 PM
Duuuuuude!
You were right :)

Thanks a lot. Got another 3 errors, but could solve them all. Thanks a lot.
Thanks thanks thanks :) And you were right. When you get a parse error, saying that one line in the file is forked up. It's not the line which is given, but one above.

Formula:

Erroline - 1 = Real line with the error.


Edit: To the admins: You might add this "trick" to change the language in the FAQ, don't you :)