Ah! This time its clear.
Ok, what you have to do is make seperate files for each language or set of properties like you already mentioned. Now what I want to tell you is that you do not need this syntax:
1 = "this is the first message"
2 = "this is the second message"
in fact, you don't need the ID at all. Heres is why: lets suppose we have a file (text.properties) with the following content:
Code:
This is the first line of the file
This is the second line of the file
This is the third line of the file
In your PHP script this is what you would do:
Code:
<?php
$foo = file("text.properties");
?>
The above will take the contents of the file text.properties and put it into an array, therefore:
$foo[0] = "This is the first line of the file"
$foo[1] = "This is the second line of the file"
$foo[2] = "This is the third line of the file"
Note that it starts at 0, this is the way PHP is built, just like most languages out there. Meaning the first line will have an ID of 0 not 1. If this confuses you, then just leave the first line of the file blank, and simply dont use the variable $foo[0].
I use this method all the time, and it works great. Use caution however if you allow users to input data into your file (text.properties), if they press enter/return it will insert a new line character (\n) and split the text amongst 2 lines, or more. The solution is simple however:
$textToInput = str_replace("\n", "", $_POST[formText]);
Hope this is helpful, and that you understand. I will be more than happy to explain something if there is confusion.
Yours,
Jamal