Files
timebank-cc-public/references/translations/PLATFORM_TRANSLATIONS_QUICK_REFERENCE.md
Ronald Huynen 2547717edb Initial commit
2026-03-23 21:37:59 +01:00

2.7 KiB

Platform Translations - Quick Reference

🚀 Quick Start

// In Blade templates
{{ platform_name() }}        // Timebank.cc
{{ platform_users() }}        // Timebankers (or Zeitbankers in German)
{{ platform_slogan() }}       // Your time is currency

// With automatic placeholder replacement
{{ trans_with_platform('Welcome @PLATFORM_USERS@!') }}

📋 Available Functions

Function Returns (EN) Returns (DE)
platform_name() " Timebank.cc" " Timebank.cc"
platform_name_short() "Timebank" "Timebank"
platform_user() "Timebanker" "Zeitbanker"
platform_users() "Timebankers" "Zeitbankers"
platform_slogan() "Your time is currency" "Deine Zeit ist Währung"
platform_principles() "Timebank principles" "Timebank Prinzipien"
platform_currency_name() "Hour" "Stunde"
platform_currency_name_plural() "Hours" "Stunden"
platform_currency_symbol() "H" "Std"

🔧 Common Use Cases

Email Subject Lines

$subject = 'Welcome to ' . platform_name();

Page Titles

<h1>{{ platform_users() }} Directory</h1>

Translated Content with Platform Terms

{{ trans_with_platform('Join @PLATFORM_USERS@ worldwide') }}

Multi-language Support

// Get German version regardless of current locale
$germanSlogan = platform_slogan('de');

📝 Translation File Placeholders

When editing JSON translation files, use these placeholders:

{
    "Welcome new user!": "Welkom nieuwe @PLATFORM_USER@!",
    "Connect with others": "Maak verbinding met andere @PLATFORM_USERS@",
    "About us": "Over @PLATFORM_NAME_SHORT@"
}

Available Placeholders:

  • @PLATFORM_NAME@ → " Timebank.cc"
  • @PLATFORM_NAME_SHORT@ → "Timebank"
  • @PLATFORM_USER@ → "Timebanker"
  • @PLATFORM_USERS@ → "Timebankers"
  • @PLATFORM_PRINCIPLES@ → "Timebank principles"
  • @PLATFORM_SLOGAN@ → "Your time is currency"
  • @PLATFORM_NAME_LEGAL@ → "association Timebank.cc"
  • @PLATFORM_CURRENCY_NAME@ → "Hour"
  • @PLATFORM_CURRENCY_NAME_PLURAL@ → "Hours"
  • @PLATFORM_CURRENCY_SYMBOL@ → "H"

⚙️ Configuration

Edit config/timebank-cc.php:

'platform_translations' => [
    'en' => [
        'platform_name' => ' Timebank.cc',
        'platform_users' => 'Timebankers',
        // ... other keys
    ],
],

After changes: php artisan config:clear

Testing

php artisan tinker
app()->setLocale('nl');
echo platform_users(); // Test Dutch

📚 Full Documentation

See PLATFORM_TRANSLATIONS.md for complete documentation.


System Status: Active (89 placeholders per language) Languages: EN, NL, DE, ES, FR