forked from hnhx/librex
-
-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
…zation) Add localization for english text on LibreY
- Loading branch information
Showing
15 changed files
with
119 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
<?php | ||
|
||
return array( | ||
"page_title" => "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" | ||
); | ||
|
||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<?php | ||
|
||
function printtext($key) { | ||
echo TEXTS[$key]; | ||
} | ||
|
||
function printftext() { | ||
$argv = func_get_args(); | ||
$key = array_shift($argv); | ||
vprintf(TEXTS[$key], $argv); | ||
} | ||
|
||
// default to language "en" | ||
$locale = "en"; | ||
|
||
$accept_language_header = $_SERVER['HTTP_ACCEPT_LANGUAGE']; | ||
|
||
if ($accept_language_header) { | ||
foreach(explode(",", explode(";", $accept_language_header)[0]) as $header_language) { | ||
if (file_exists("locale/$header_language.php")) { | ||
$locale = $header_language; | ||
break; | ||
} | ||
} | ||
} | ||
|
||
define("TEXTS", require "locale/$locale.php"); | ||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters