diff --git a/engines/ahmia/hidden_service.php b/engines/ahmia/hidden_service.php
index a547078..ad5ffda 100644
--- a/engines/ahmia/hidden_service.php
+++ b/engines/ahmia/hidden_service.php
@@ -21,7 +21,7 @@
array_push($results,
array (
- "title" => $title ? htmlspecialchars($title) : "No description provided",
+ "title" => $title ? htmlspecialchars($title) : TEXTS["result_no_description"],
"url" => htmlspecialchars($url),
// base_url is to be removed in the future, see #47
"base_url" => htmlspecialchars(get_base_url($url)),
diff --git a/engines/bittorrent/merge.php b/engines/bittorrent/merge.php
index 08bd0f7..3de1a69 100644
--- a/engines/bittorrent/merge.php
+++ b/engines/bittorrent/merge.php
@@ -38,7 +38,7 @@
echo "
";
if (empty($results)) {
- echo "
There are no results. Please try different keywords!
";
+ echo "
" . TEXTS["failure_empty"] . "
";
return;
}
diff --git a/engines/librex/fallback.php b/engines/librex/fallback.php
index d3b6c34..4e22173 100644
--- a/engines/librex/fallback.php
+++ b/engines/librex/fallback.php
@@ -67,7 +67,7 @@
return array(
"error" => array(
- "message" => "No results found. Unable to fallback to other instances."
+ "message" => TEXTS["failure_fallback"]
)
);
}
diff --git a/engines/text/duckduckgo.php b/engines/text/duckduckgo.php
index da35f93..ae80446 100644
--- a/engines/text/duckduckgo.php
+++ b/engines/text/duckduckgo.php
@@ -1,7 +1,6 @@
query));
$results = array();
@@ -53,7 +52,7 @@
// base_url is to be removed in the future, see #47
"base_url" => htmlspecialchars(get_base_url($url)),
"description" => $description == null ?
- "No description was provided for this site." :
+ TEXTS["result_no_description"] :
htmlspecialchars($description->textContent)
)
);
diff --git a/engines/text/google.php b/engines/text/google.php
index 814eb47..8435743 100644
--- a/engines/text/google.php
+++ b/engines/text/google.php
@@ -64,7 +64,7 @@
// base_url is to be removed in the future, see #47
"base_url" => htmlspecialchars(get_base_url($url)),
"description" => $description == null ?
- "No description was provided for this site." :
+ TEXTS["result_no_description"] :
htmlspecialchars($description->textContent)
)
);
@@ -72,7 +72,7 @@
if (empty($results) && !str_contains($response, "Our systems have detected unusual traffic from your computer network.")) {
$results["error"] = array(
- "message" => "There are no results. Please try different keywords!"
+ "message" => TEXTS["failure_empty"]
);
}
diff --git a/index.php b/index.php
index 92df811..288eb54 100644
--- a/index.php
+++ b/index.php
@@ -10,8 +10,8 @@
-
-
+
+
diff --git a/instances.php b/instances.php
index 0ecffc5..ad31932 100644
--- a/instances.php
+++ b/instances.php
@@ -51,7 +51,7 @@
list_instances($librey_instances);
?>
-
The following instances are running the older LibreX:
+
LibreX")?>:
diff --git a/locale/en.php b/locale/en.php
new file mode 100644
index 0000000..e5d9592
--- /dev/null
+++ b/locale/en.php
@@ -0,0 +1,53 @@
+ "LibreY search",
+ "search_button" => "Search with LibreY",
+ "torrent_search_button" => "Search torrents with LibreY",
+
+ "source_code_link" => "Source",
+ "instances_link" => "Instances",
+ "settings_link" => "Settings",
+ "api_link" => "API",
+ "donate_link" => "Donate ❤️",
+
+ "latest_commit" => "Latest commit: %s",
+
+ "category_general" => "General",
+ "category_images" => "Images",
+ "category_videos" => "Videos",
+ "category_torrents" => "Torrents",
+ "category_tor" => "Tor",
+
+ "feature_disabled" => "The host has disabled this feature :C",
+
+ "settings_title" => "Settings",
+ "settings_theme" => "Theme",
+ "settings_special_disabled" => "Disable special queries (e.g.: currency conversion)",
+
+ "settings_frontends" => "Privacy friendly frontends",
+ "settings_frontends_description" => "For an example if you want to view YouTube without getting spied on, click on \"Invidious\", find the instance that is most suitable for you then paste it in (correct format: https://example.com)",
+ "settings_frontends_disable" => "Disable frontends",
+
+ "settings_search_settings" => "Search settings",
+ "settings_language" => "Language",
+
+ "settings_number_of_results" => "Number of results per page",
+
+ "settings_safe_search" => "Safe search",
+ "settings_save" => "Save",
+ "settings_reset" => "Reset",
+
+
+ "failure_fallback" => "No results found. Unable to fallback to other instances.",
+ "failure_empty" => "No results found. Please try different keywords!",
+ "result_no_description" => "No description was provided for this site.",
+
+ "instances_librex" => "The following instances are running the older %s",
+
+ "donate_original_developer" => "Donate to the original developer of %s, a
+ project LibreY tries to improve.",
+ "donate_fork" => "Donate to the person that forked LibreX into %s"
+);
+
+?>
diff --git a/locale/localization.php b/locale/localization.php
new file mode 100644
index 0000000..6e40791
--- /dev/null
+++ b/locale/localization.php
@@ -0,0 +1,27 @@
+
diff --git a/misc/footer.php b/misc/footer.php
index 9b1b179..af063d4 100644
--- a/misc/footer.php
+++ b/misc/footer.php
@@ -1,15 +1,15 @@