
內容簡介
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)
