Skip to content
Back to skills

I18n Helper

ASecurity

Handle WordPress internationalization. Use when adding translatable strings.

  • 666 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added February 9, 2026
toolsphpbashapi

Works with

  • api

Security analysis

A100/100

Scanned February 12, 2026

npx -y skills add majiayu000/claude-skill-registry --skill i18n-helper --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of I18n Helper?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for I18n Helper
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/majiayu000-i18n-helper/badge)](https://www.skillsdirectory.com/skills/majiayu000-i18n-helper)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: i18n-helper
description: Handle WordPress internationalization. Use when adding translatable strings.
---

# i18n Helper

## Instructions

When adding translatable strings to the plugin:

1. **Use the correct text domain**: `'retrologin'`
2. **Choose the right function**:
    - `__()` - Return translated string
    - `_e()` - Echo translated string
    - `esc_html__()` - Return escaped translated string
    - `esc_html_e()` - Echo escaped translated string
    - `esc_attr__()` - Return escaped for HTML attributes
3. **Generate POT file**: `composer run make-pot`
4. **Keep strings in English (US)**

## Translation Functions

| Function                     | Output          | Use When                      |
| ---------------------------- | --------------- | ----------------------------- |
| `__($text, $domain)`         | Return          | Strings in PHP variables      |
| `_e($text, $domain)`         | Echo            | Direct output                 |
| `esc_html__($text, $domain)` | Return + escape | Displaying user content       |
| `esc_html_e($text, $domain)` | Echo + escape   | Direct output of user content |
| `esc_attr__($text, $domain)` | Return + escape | HTML attributes               |

## Example

```php
// Basic usage
__('Login Page', 'retrologin');
_e('Welcome back!', 'retrologin');

// With escaping
esc_html__('Please log in to continue', 'retrologin');
esc_attr__('Username', 'retrologin');

// In attributes
<input placeholder="<?php esc_attr_e('Enter username', 'retrologin'); ?>">
```

## Generate Translations

```bash
# Generate POT file for translations
composer run make-pot

# POT file location: inc/languages/retrologin.pot
```

## Guidelines

-   Always include text domain second parameter
-   Use escaping functions for user-generated content
-   Keep strings concise for translation
-   Avoid embedding variables in translatable strings

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.