You've already forked wc-tier-and-package-prices
Enhanced package quantity restriction enforcement by replacing "Add to Cart" buttons with "View Options" links on catalog pages for products with quantity restrictions. This prevents customers from attempting to add restricted products directly from shop/category pages. Changes: - Added catalog button modification for restricted products - Implemented "View Options" button with eye icon styling - Created has_quantity_restriction() helper method - Extended CSS loading to all WooCommerce pages - Added modify_catalog_add_to_cart_button() filter method - Updated translations with 2 new strings (en_US, de_DE, de_CH_informal) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
WooCommerce Tier and Package Prices - Translations
This directory contains translation files for the WooCommerce Tier and Package Prices plugin.
Available Languages
- English (US) -
en_US- Default language - German (Germany) -
de_DE- Deutsch
File Structure
languages/
├── README.md # This file
├── wc-tier-package-prices.pot # Translation template (3.1 KB)
├── wc-tier-package-prices-en_US.po # English source file
├── wc-tier-package-prices-en_US.mo # English compiled file (2.9 KB)
├── wc-tier-package-prices-de_DE.po # German source file
└── wc-tier-package-prices-de_DE.mo # German compiled file (3.0 KB)
File Types
.pot- Portable Object Template - Master template file for creating new translations.po- Portable Object - Human-readable translation source file.mo- Machine Object - Compiled binary file used by WordPress
Adding a New Translation
Method 1: Using Poedit (Recommended)
- Download and install Poedit
- Open Poedit and click "Create new translation"
- Select the
wc-tier-package-prices.potfile - Choose your language
- Translate all strings
- Save the file (this creates both
.poand.mofiles automatically) - Name the files as
wc-tier-package-prices-{locale}.poandwc-tier-package-prices-{locale}.mo- Example for French:
wc-tier-package-prices-fr_FR.poandwc-tier-package-prices-fr_FR.mo
- Example for French:
Method 2: Using Command Line
-
Copy the POT file to create a new PO file:
cp wc-tier-package-prices.pot wc-tier-package-prices-fr_FR.po -
Edit the PO file header:
"Language: fr_FR\n" "Language-Team: French\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" -
Translate all
msgstrentries in the PO file -
Compile the PO file to MO:
msgfmt -o wc-tier-package-prices-fr_FR.mo wc-tier-package-prices-fr_FR.po
WordPress Locale Codes
Common locale codes for WordPress:
en_US- English (United States)en_GB- English (United Kingdom)de_DE- German (Germany)de_CH- German (Switzerland)fr_FR- French (France)fr_CH- French (Switzerland)es_ES- Spanish (Spain)it_IT- Italian (Italy)nl_NL- Dutch (Netherlands)pt_BR- Portuguese (Brazil)ru_RU- Russianzh_CN- Chinese (Simplified)ja- Japanese
For a complete list, see: https://translate.wordpress.org/
Translation Statistics
English (en_US)
- Total strings: 30
- Translated: 30 (100%)
- Status: ✅ Complete
German (de_DE)
- Total strings: 30
- Translated: 30 (100%)
- Status: ✅ Complete
Translatable Strings
The plugin contains translations for:
Admin Interface
- Settings page titles and descriptions
- Product meta box labels
- Field labels and placeholders
- Button text
Frontend
- Pricing table headers
- Package selection buttons
- Cart notifications
- Discount displays
Testing Translations
1. Install Translation Files
Upload the .mo file to one of these locations:
- Plugin directory:
wp-content/plugins/wc-tier-and-package-prices/languages/ - WordPress languages directory:
wp-content/languages/plugins/
2. Change WordPress Language
- Go to Settings > General
- Set Site Language to your desired language
- Save changes
3. Verify Translation
- Navigate to WooCommerce > Tier & Package Prices
- Edit a product and check the meta boxes
- View a product on the frontend
- Check the cart page
All text should appear in the selected language.
Updating Existing Translations
When the plugin is updated with new strings:
- Update the POT template file
- Open your PO file in Poedit
- Click Catalog > Update from POT file
- Select the new
wc-tier-package-prices.potfile - Translate any new strings
- Save (automatically compiles to MO)
Command Line Compilation
If you prefer command-line tools:
# Compile a single language
msgfmt -o wc-tier-package-prices-de_DE.mo wc-tier-package-prices-de_DE.po
# Compile all languages at once
for po in *.po; do
msgfmt -o "${po%.po}.mo" "$po"
done
# Verify MO file
msgunfmt wc-tier-package-prices-de_DE.mo | less
Translation Guidelines
Style Guide
- Consistency: Use consistent terminology throughout
- Context: Consider the context where text appears (admin vs frontend)
- Length: Keep translations similar in length to the original
- Formality: Maintain appropriate level of formality for your language
- Technical Terms: Don't translate technical terms like "WooCommerce"
German Translation Notes
- Uses formal "Sie" form (not informal "du")
- Currency examples adjusted (€ instead of $)
- Decimal separator uses comma (9,99 instead of 9.99)
- Date format: DD.MM.YYYY
Best Practices
- ✅ Translate user-facing strings
- ✅ Keep HTML tags intact
- ✅ Preserve placeholders like
%s,%d - ✅ Maintain the same number of placeholders
- ❌ Don't translate variable names
- ❌ Don't translate code or CSS classes
- ❌ Don't remove or add HTML tags
Contributing Translations
To contribute a new translation:
- Create the PO and MO files following the guidelines above
- Test thoroughly in a WordPress installation
- Submit via pull request or contact the developer
- Include:
- Both PO and MO files
- Your name/credits for attribution
- Screenshot showing the translation in use
Support
For translation-related questions or to request a new language:
- Plugin URI: https://src.bundespruefstelle.ch/wc-tier-package-prices
- Author: Marco Graetsch
- Author URI: https://src.bundespruefstelle.ch/magdev
Credits
Translators
- English (en_US): Marco Graetsch
- German (de_DE): Marco Graetsch
Translation Tools
- Poedit - Cross-platform PO editor
- Loco Translate - WordPress plugin for translations
- GNU gettext - Command-line tools
License
Translation files are distributed under the same GPL v2 or later license as the plugin.