Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Wordpress i18n TaggerNew to Visual Studio Code? Get it now.

Wordpress i18n Tagger

cambam

|
1,987 installs
| (0) | Free
Automacially enclose a highlighted string in a WordPress localization function.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

wordpress-i18n-tagger README

I got really sick of manually doing this when taking over a coworkers code because they would always ignore localization. Makes it simple to wrap a string and then do a search/replace for 'text-domain'.

Extension can also wrap with string concatenation.

Note: Uses WordPress code styling.

How to Use

Open the Command Palette using ⇧ + ⌘ + P (macOS) or ⇧ + ctrl + P (Windows)

WP Localize: (Function) for localization functions

⌥ + ⌘ + l (macOS) or alt + ctrl + l (Windows)

PHP Wrap Concatenation: (Prepend|Append|Both) for string concatenation

Key Bindings

Localize: __() - ⌥ + ⌘ + l (macOS) or alt + ctrl + l (Windows)

PHP Wrap Concatenation: Both - ⌥ + ⌘ + w b (macOS) or alt + ctrl + w b (Windows)

Features

WP Localization functions available

__()
_e()
esc_html__()
esc_html_e()
esc_attr__()
esc_attr_e()

String concatenation

  • Prepend
' . $string
  • Append
$string . '
  • Both
' . $string . '

Known Issues

  • Not well coded
  • Only does basic localization functions at the moment

Release Notes

0.0.8

Added key bindings for basic localization warap and both concatenation

0.0.7

Initial public release


  • Contact us
  • Jobs
  • Privacy
  • Terms of use
  • Trademarks
© 2023 Microsoft