站长百科 | 数字化技能提升教程 数字化时代生存宝典
首页
数字化百科
电子书
▼
建站程序
开发
服务器
办公软件
开发教程
▼
服务器教程
软件使用教程
运营教程
热门电子书
▼
CSS教程
WordPress教程
导航
程序频道
推广频道
网赚频道
人物频道
网站程序
网页制作
云计算
服务器
CMS
论坛
网店
虚拟主机
cPanel
网址导航
WIKI使用导航
WIKI首页
热点词条
最新资讯
网站程序
站长人物
页面分类
使用帮助
编辑测试
创建条目
网站地图
站长百科导航
站长百科
主机侦探
IDCtalk云说
跨境电商导航
WordPress啦
站长专题
网站推广
网站程序
网站赚钱
虚拟主机
cPanel
网址导航专题
云计算
微博营销
虚拟主机管理系统
开放平台
WIKI程序与应用
美国十大主机
编辑“
Gallery:语言设定
”
人物百科
|
营销百科
|
网赚百科
|
站长工具
|
网站程序
|
域名主机
|
互联网公司
|
分类索引
Sunzz1985
(
讨论
|
贡献
)
2008年6月11日 (三) 10:01的版本
(新页面: = Language Settings in Gallery 2 = The preferred language can be set per session, per user, as a site default and you can change it also with a override with a request parameter. '''NOTE...)
(差异) ←上一版本 |
最后版本
(
差异
) |
下一版本→
(
差异
)
跳转至:
导航
、
搜索
警告:您正在编辑的是本页面的旧版本。
如果您发布该更改,该版本后的所有更改都会丢失。
警告:
您没有登录。如果您做出任意编辑,您的IP地址将会公开可见。如果您
登录
或
创建
一个账户,您的编辑将归属于您的用户名,且将享受其他好处。
反垃圾检查。
不要
加入这个!
= Language Settings in Gallery 2 = The preferred language can be set per session, per user, as a site default and you can change it also with a override with a request parameter. '''NOTE:''' This article describes the behavior in '''Gallery 2.1'''. Gallery 2.0/2.0.1/2.0.2 have a slightly different behavior (e.g. set the default language to ''None'' if you want the browser language preference check in Gallery 2.0). == Priority - Which setting is valid when? == This should be the priority, meaning that 1. will override 2-6 and 4 will override 5, 6 if 1-3 is not set, etc. # g2_language=languageCode in request string # activeLanguage from embedding application (only applicable to Embedded G2) # Active language of the current session # Preferred language of the current user # (Optional) Preferred language specified by the browser of the user # Site wide default language for G2 Usually, you don't use g2_language overrides in URLs. And new visitors of your website don't have an active language yet and they they are not logged in as user yet. Thus, Gallery 2 will default to the preferred language specified in ''site admin''. If you enable the browser language preference check in ''site admin'', it will use the language specified by the browser of the visitors. And if the language preference specified by the browser is not available in your Gallery installation, it will default to Gallery default language (the one defined in ''site admin''). === What does "Preferred Language" mean? === If the Gallery 2 translation for a specific language is 100% complete (that is, if all strings in Gallery 2 have been translated in this language), the complete Gallery 2 experience will be translated into this language if this language is chosen. If a translation is not 100% complete, all non-translated strings can't be translated and you will see a mix of English and your preferred language. == Overview over the 6 Language Settings == === Site wide default language for G2 === You can set the site wide default language for G2 in ''site admin'' -> ''General''. See [[#Requirements|Requirements]]. It will be used for all users, unless you enable the browser language preference check. If so, it will use this default as fallback if the browser preference is not available. This default can always be overriden in the user preferences of each user and also with the language selector block if you choose to show the block. === Preferred language of the current user === Each user can set the preferred language in ''Your settings''. This overrides the site wide default language. === Active language of the current session === After visiting the first page of your G2, G2 stores some data for this visitor, to keep track of the user's preferences etc. It also stores the preferred language for this user. All users, including anonymous visitors (guests) can choose their preferred language in G2 if you add the ''language selector'' block to the sidebar. You can dot that in ''site admin'' -> ''Themes'' -> ''Matrix'' (or whatever your active theme name is). The active language of the current session overrides a user's preferred language and the site wide default language. === Preferred language specified by the browser === Browsers like Internet Explorer, Firefox, Opera, and pretty much every other browser give the webserver a hint what language the user might expect. Usually, if you use MS Windows in your language rather than in English, then Internet Explorer will also include the language code for your language in all requests to Gallery 2. Similarely, if you downloaded Firefox for your language, then it will tell Gallery 2 that you expect websites in this language. If you're using Firefox in English but would rather prefer another language, you can change this in the Firefox options. If the browser language preference check is enabled in ''site admin'', Gallery 2 will detect this preferred language as specified by the browser (the HTTP_ACCEPT_LANGUAGE header). If any language listed in HTTP_ACCEPT_LANGUAGE is available in Gallery 2, it will use it. Else, it will fall back to the Gallery 2 default language. === activeLanguage from GalleryEmbed::init() (Embedded G2) === If Gallery 2 is embedded in another application through the GalleryEmbed API, then the embedding application can specify the active language for the current user/session in the call to G2. This language setting will set the session language in G2. === g2_language=languageCode in request string === If you want to add links to your G2 that already default to different languages, you can add the g2_language=languageCode parameter to the link. E.g. on your entry page, you could have a French flag linking to your Gallery 2 with main.php?g2_language=fr and a British/American flag which uses the link main.php?g2_language=en . This will override any other language preference. == Requirements == * Your PHP needs to have gettext support built-in and loaded. * Your system/server must have the locales (=~ translations into your languages) installed. See: [[Gallery:FAQ#I_changed_the_language_but_nothing_happens.2C_what.27s_wrong.3F|FAQ: I changed the language but nothing happens, what's wrong?]] * You do not need the [[Gallery:Modules:multilang|multilang module]]. The multilanguage module can be used to translate the content, your album and image titles, descriptions etc. The built-in G2 translation translates the menus, the user interface, the welcome / confirmation emails, but G2 can't translate the titles that you entered without the multilanguage module. == TODO == * Downloadable Language Packs / Define in Site admin which languages should be available to the users [[Category:Gallery 2:Usage]] [[Category:Gallery 2:Configuration]]
摘要:
请注意,您对站长百科的所有贡献都可能被其他贡献者编辑,修改或删除。如果您不希望您的文字被任意修改和再散布,请不要提交。
您同时也要向我们保证您所提交的内容是您自己所作,或得自一个不受版权保护或相似自由的来源(参阅
Wordpress-mediawiki:版权
的细节)。
未经许可,请勿提交受版权保护的作品!
取消
编辑帮助
(在新窗口中打开)