內容簡介
這個外掛可以透過標記文字以不同語言呈現,旁邊會有旗幟圖示,允許使用者在不同語言中進行切換。
博客的其他元素並不會被翻譯。
使用[:gb]來指定以下文字部分是英文,或是使用任何其他兩個字元的語言代碼。
若要在多種語言中使用同一段落文字,可以使用例如[:gb,de],這對像圖像等元素很方便。
使用[:*]來在所有(已知的)語言中使用該段落文字。
您可以毫無問題地混合許多這些標記,例如:[:gb]英文介紹[:de]德文介紹[:*]常見圖像[...]。
選擇性地,文本的標題也可以是多語言的,但需要主題修改。
旗幟可以放置於以下位置:
文字旁邊。這是默認值並且僅需安裝即可使用。
標題旁邊。這需要模板更改。
其他位置。如果您想將旗幟放在小工具中,也可以這樣做(已包含在外掛中)。
感謝
感謝:
zorun 提供旗幟。
Tamas、Anton 進行測試。
貢獻
您可以重新製作自述文件和其他文本,那將會非常有幫助。
如果您有任何想法/錯誤,請與我聯絡。
代碼
此套件還包含一個針對PHP 5.3+的版本。該文件與另一個文件(僅需要PHP 5.2)在功能上相同,但使用了一個新功能,更易讀/寫。
當WordPress需要PHP5.3+(未來某個時間)時,將使用該文件。
旗幟
旗幟來自http://www.free-country-flags.com/,並使用CC-BY-SA許可證(http://creativecommons.org/licenses/by-sa/3.0/)。
外掛標籤
開發者團隊
原文外掛簡介
Just tag parts of your text to be in different languages, and a flag will appear next to the text and allows users to switch between them.
No other elements of the blog will be translated.
Use [:gb] to specify that the following text part is english, or use any other two char language code.
To use one text block in multiple languages use e.g. [:gb,de], which is handy for parts like images.
Write [:*] to use the block in all (within the text already known) languages.
You can without any problem mix many of those tags. e.g. [:gb]english-intro[:de]german-intro[:*]common image[...].
Optionally also the title of a text can be multilingual, but requires theme modification.
The flags can be placed:
next to the text. This is the default and do work out of the box.
next to the title. This requires a template change.
an other place. If you would like to place e.g. the flags in a widget (which is included).
Thanks
Thanks to:
zorun for the flags
Tamas, Anton for beta testing
Contributing
You may overwork the readme and also the other texts… that would be great.
If you have ideas/bugs please contact me.
Code
The package also contains an version for PHP5.3+. The file is functional identical to the other one (which only requires PHP 5.2) but makes usage of a nice new feature and is easier to read/write.
When WordPress requires PHP5.3+ (sometime in the future) that file will be used.
Flags
The flags are from http://www.free-country-flags.com/ and under CC-BY-SA License (http://creativecommons.org/licenses/by-sa/3.0/).
