Most of my pages are for german speaking people, so I rewrite some parts of the UI to be in german.
Now, I was wondering if this could be possible to be done on creation of the files. Like oil reading the language-value in the app/.../config.php file and select the titles accordingly.
I'm willing to do that, if someone gives me a general hint or advice for what to look for, so that I don't do anything to stupid.
Ideally everything language dependent should be in language files, so you can swap just by switching the language set in the config. This is what the Lang class is for.
All our applications have a multilingual interface using this mechanism.
On that part: In uploaded.php: The error 'error_'.\Upload::UPLOAD_ERR_FORM_SIZE, it tells me 'The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form'. But is the file really uploaded? I mean, wouldn't that defeat the idea of having such a directive? Shouldn't it be called 'The file you wanted to upload...'?
Giving it more thought: The language differences are much wider than just adapting the error messages and words, the grammar differs... For example: Session::set_flash('success', e('Eintrag #' . $id .' aktualisiert.'));
Perhaps, but it's the way PHP works. If the file exceeds the size defined in the php.ini, you won't be able to access it, and you'll get this error. I can imagine that it will abort the upload if this size is exceeded to avoid unneeded load on the server.
For parameters in messages, I use sprintf() which allows you to position them where you want: