好用的图床程序 chevereto-free升到1.5.1版本后没中文了 如何设置成中文版?已亲测可用
Chevereto,是一款采用PHP语言开发的网络相册脚本程序,其安装快速,不需要数据库,支持图片的批量上传,
支持主题的定制。Chevereto是多语言支持的,并且提供中文语言包的下载。在Chevereto 1.7及1.9的时候,
软件是免费的,但是目前其最新的版本 Chevereto 2.0.14在下载前,需先购买其许可证,30美元。 
目前免费版最新版本1.5.1


chevereto是目前最好的图床之一了。功能也非常强大。其免费版和收费版的区别,在于收费版多了硬盘扩展,
社交分享功能和技术支持。硬盘扩展指的是你可以通过sftp等方式把上传的文件储存在其他服务器上。
所以个人觉得,这个免费版已经足够使用了。而且chevereto的安装也非常简单,并且支持中文。
网上很多教程都写得不是很清楚,这里就发个详细安装教程吧。
官网:https://chevereto.com/
DEMO:https://demo.chevereto.com/

目前升级到最新版1.5版本以后 界面就是全英文

从站长论坛找到的解决办法 发一下

The easy-to-use image bed program chevereto-free has no Chinese after upgrading to version 1.5.1. How to set it to Chinese version? Chevereto has been tested and available. It is a web photo album script program developed in PHP language. It is installed quickly, does not require a database, supports batch upload of pictures, and supports customization of themes. Chevereto is multi-language support, and provides download of Chinese language pack. In Chevereto 1.7 and 1.9, the software was free, but the latest version of Chevereto 2.0.14 needs to be purchased before downloading its license, which is $30. The latest version 1.5.1chevereto of the free version is currently one of the best picture beds. The function is also very powerful. The difference between the free version and the paid version is that the paid version has more hard drive expansion, social sharing functions and technical support. Hard disk expansion means that you can store uploaded files on other servers through sftp and other methods. So I personally feel that this free version is enough to use. Moreover, the installation of chevereto is very simple and supports Chinese. Many tutorials on the Internet are not very clear, so here is a detailed installation tutorial.
Official website: https://chevereto.com/DEMO: https://demo.chevereto.com/ At present, after upgrading to the latest version 1.5, the interface is all in English. The solution found from the webmaster forum. Send me the latest version of chevereto. Suddenly canceling support for other languages, the author is really unkind.
I studied the author's code carefully and found a way to restore the Chinese language.
Step 1 Open the file: lib/G/classes/class.gettext.php update: the latest version of chevereto no longer carries this file, you can click the link below to download and unzip it and upload it to the corresponding directory. Or you can download an old version of chevereto from the Internet to extract the file. If you are upgrading from an old version, you do not need to download it.
[Rihide]class.gettext[/rihide][/ri-login-hide] search: private function cache(), add return false; in the second line below it.
Description: This function writes language cache, it will change language cache file forcibly. Change here to let it return directly, do not write to the cache.
The modified code is as follows: private function cache()
{return false;//This is a new line if (!@is_dir(dirname($this->cache_file))) {throw new GettextException("Target cache dir doesn't exists", 400);} Step 2 opens File app/lib/l10n.php search: if ($msg && !is_null($args)) {, add a line above this line: $msg = CHV\L10n::gettext($msg); This line is used Call the translation function.
Step 3 Open the file app/loader.php, search for define('CHV_APP_PATH_CONTENT_SYSTEM', CHV_APP_PATH_CONTENT.'system/');, add below this line: define('CHV_APP_PATH_CONTENT_LANGUAGES', CHV_APP_PATH_CONTENT.'languages/'); this line is the definition A language file path is added, the latest version is removed, and we need to add it back.
Step 4 Download the Chinese language file:

After unzipping, upload the language file to the website app/content/languages/overrides/ and app/content/languages/cache /overrides/ in two folders. The second folder may not exist before and needs to be created manually.
Step 5 If your website was originally set to display Chinese language, this step can be ignored.
If it was originally in another language, or you said it was newly installed, you need to enter the database, change the data table chv_settings, and change the setting-value of default_language inside to zh-CN

chevereto图床的最新版本突然就取消支持他国语言了,作者真是不厚道。

具体原因是 从今年10月份后 程序交给了棒子维护  , 该死的棒子开发者把除了英文外的所有语言文件全部删除 这个在github可以查证

我仔细研究了一下这个作者的代码,找到了恢复中文语言的方法。

步骤1

打开文件:lib/G/classes/class.gettext.php

更新:最新版本chevereto已经不带这个文件了,您可以点下面链接下载解压后上传至对应目录。或者您自己在网上下载个旧版chevereto从中提取该文件。如果您是由旧版升级来的,则不用下载。

 

搜索:private function cache(),在其下面第二行加上return false;

说明:这个函数是写语言缓存的,它会强行更改语言缓存文件。这里改成让它直接返回,不要写缓存。
更改后的代码如下:

private function cache()
{
return false;//这是新加的一行
if (!@is_dir(dirname($this->cache_file))) {
throw new GettextException("Target cache dir doesn't exists", 400);
}

步骤2

打开文件app/lib/l10n.php
搜索:if ($msg && !is_null($args)) {,在这行上面增加一行:$msg = CHV\L10n::gettext($msg);

更改后的代码如下:

function _s($msg, $args=null)
{ $msg = CHV\L10n::gettext($msg);
if ($msg && !is_null($args)) {
$fn = is_array($args) ? 'strtr' : 'sprintf';

这行是用于调用翻译函数。

步骤3

打开文件app/loader.php
搜索define('CHV_APP_PATH_CONTENT_SYSTEM', CHV_APP_PATH_CONTENT . 'system/');,在这行下面增加:

define('CHV_APP_PATH_CONTENT_LANGUAGES', CHV_APP_PATH_CONTENT . 'languages/');

这行是定义了一个语言文件路径,最新版本给去掉了,我们要加回去。

步骤4

下载中文语言文件:

解压后,把该语言文件上传到网站的app/content/languages/overrides/app/content/languages/cache/overrides/两个文件夹内。第二个文件夹可能原来没有,需要手动新建。

步骤5

如果你网站原来就是设置的显示中文语言,该步骤可忽略。
如果原来是其他语言,或者你说新安装的,需要进数据库,把数据表chv_settings,把里面的default_language的setting-value值改为zh-CN

声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。