Website translation with php array files #48
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The website has been revised moving all relevant english text into specific file /languages/en.php.
Italian translation has been prepared into /languages/it.php file.
These files contain the $lang["key"] array with all text translated.
The usage is simple, for example the
_btn_back.php
changed from<a href="landing.php" class="btn btn-lg btn-primary btn-block">Return to menu</a>
to
/languages/en.php
contains/languages/it.php
containsNew "Language" setting is available in Settings page, currently with "en" and "it" values.
After saved the settings you will see automatically the website translated to the selected language.
There is only 1 known limit on this solution: the english text defined into javascript files can't be easly translated because ot the client-side nature.
To translate other languages follow these steps:
I waited 1 month of personal testing before to create this PR and haven't found any issues.
This solve issue #25
I didn't change the
$app_version
inconfiguration_system.php
. I propose 2.0.0 or at least 1.3.0.