[WordPress] 外掛分享: Spelhubben Weather

首頁外掛目錄 › Spelhubben Weather
WordPress 外掛 Spelhubben Weather 的封面圖片
10+
安裝啟用
尚無評分
5 天前
最後更新
問題解決
WordPress 6.9.4+ PHP 7.4+ v2.0.2 上架:2025-10-01

內容簡介

Spelhubben Weather 外掛可顯示當前天氣及可選的天氣預報,並能從多個免費全球天氣提供者聚合數據,提供準確的天氣資訊,適用於全球範圍,特別是在歐洲地區表現優異。

【主要功能】
• 顯示當前天氣與預報
• 聚合多個天氣數據來源
• 支援多語言翻譯功能

外掛標籤

開發者團隊

⬇ 下載最新版 (v2.0.2) 或搜尋安裝

① 下載 ZIP → 後台「外掛 › 安裝外掛 › 上傳外掛」
② 後台搜尋「Spelhubben Weather」→ 直接安裝(推薦)
📦 歷史版本下載

原文外掛簡介

This plugin displays current weather and an optional forecast. It can aggregate data from free global weather providers (Open-Meteo, SMHI, Yr/MET Norway, FMI, Open-Weathermap, and Weatherapi.com) and compute a simple consensus. Works worldwide with excellent coverage in Europe and beyond.
License
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
Full license text is included in the LICENSE file in the plugin root.
Feedback & Bug Reports
Feedback and bug reports can be posted here: https://github.com/K3NT4/spelhubben-weather/issues
For common questions see the FAQ: https://github.com/K3NT4/spelhubben-weather/blob/main/Docs/FAQ.md
For Roadmap: https://github.com/users/K3NT4/projects/2
License: GPLv3 or later
License URI: https://www.gnu.org/licenses/gpl-3.0.html
Weather widget & block with optional map and daily forecast. Can combine Open-Meteo, SMHI, Yr/MET, FMI, Open-Weathermap, and Weatherapi.com data.
Translations
The plugin is fully translatable and includes built-in translations for Swedish (sv_SE) and Norwegian Bokmål (nb_NO).
How to translate the plugin
Option 1: Contribute to translate.wordpress.org (recommended)
– Visit translate.wordpress.org
– Select your language and add translations via the browser interface
– Your translations will automatically be included in future releases
Option 2: Local translation files
If you need to add or modify translations locally:

Generate or update the POT file (translation template):
wp i18n make-pot . languages/spelhubben-weather.pot --slug=spelhubben-weather

Create a PO file for your language (e.g., spelhubben-weather-de_DE.po):

Copy the .pot file and rename to match your locale (e.g., de_DE)
Use a translation tool like Poedit or a text editor
Translate all strings in the PO file
Save the file as spelhubben-weather-de_DE.po

Generate the MO file (compiled binary format):
msgfmt spelhubben-weather-de_DE.po -o spelhubben-weather-de_DE.mo

Place files in the plugin:

Store both .po and .mo files in /languages/
Also generate a .l10n.php file (WordPress 6.0+):
wp i18n make-json languages/spelhubben-weather-de_DE.po --no-purge

Activate your translation:

Change your WordPress language to match the locale code (Settings → General → Site Language)
The plugin will automatically load the translated strings

Translation file structure:
languages/
spelhubben-weather.pot (template for all translations)
spelhubben-weather-sv_SE.po (Swedish source text)
spelhubben-weather-sv_SE.mo (Swedish compiled)
spelhubben-weather-sv_SE.l10n.php
spelhubben-weather-nb_NO.po (Norwegian source text)
spelhubben-weather-nb_NO.mo (Norwegian compiled)
spelhubben-weather-nb_NO.l10n.php
What gets translated:
– All frontend strings (shortcode output, widget labels, weather descriptions, WMO codes)
– Admin settings and UI labels
– JavaScript strings (expand/collapse, status messages)
– Error messages and notices
Best practices:
– Use context clues in the POT file (msgctxt) to distinguish similar phrases
– Test your translation in WordPress to ensure formatting and plurals work correctly
– Check that translated UI aligns properly in your language (RTL vs LTR)

延伸相關外掛

文章
Filter
Mastodon