# Platform Translations - Quick Reference
## ๐ Quick Start
```php
// 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
```php
$subject = 'Welcome to ' . platform_name();
```
### Page Titles
```blade
{{ platform_users() }} Directory
```
### Translated Content with Platform Terms
```blade
{{ trans_with_platform('Join @PLATFORM_USERS@ worldwide') }}
```
### Multi-language Support
```php
// Get German version regardless of current locale
$germanSlogan = platform_slogan('de');
```
## ๐ Translation File Placeholders
When editing JSON translation files, use these placeholders:
```json
{
"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`:
```php
'platform_translations' => [
'en' => [
'platform_name' => ' Timebank.cc',
'platform_users' => 'Timebankers',
// ... other keys
],
],
```
After changes: `php artisan config:clear`
## โ
Testing
```bash
php artisan tinker
```
```php
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