Skip to content

Instantly share code, notes, and snippets.

@calien666
Last active April 12, 2023 12:34
Show Gist options
  • Save calien666/443eba6bf10a33e986156da62fbea4df to your computer and use it in GitHub Desktop.
Save calien666/443eba6bf10a33e986156da62fbea4df to your computer and use it in GitHub Desktop.
Local language File and code templates for PHpStorm/WebStorm
<!-- add under settings -> Editor -> File and Code Templates -->
<!-- put into file name: #if ($TARGET!="")$TARGET.#end${NAME} -->
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<xliff version="1.0">
<file source-language="en" target-language="$TARGET" datatype="plaintext" original="messages" date="${YEAR}-${MONTH}-${DAY}T${HOUR}:${MINUTE}:${SECOND}Z">
<header>
<generator>PhpStorm</generator>
</header>
<body>
</body>
</file>
</xliff>
<!-- add under Settings -> Editor -> Live Templates, possible shortcut: tgt -->
<target>$TARGET$</target>
<!-- add under Settings -> Editor -> Live Templates, possible Shortcut: tran -->
<trans-unit id="$NAME$">
<source>$SOURCE$</source>
</trans-unit>
@Tuurlijk
Copy link

Tuurlijk commented Sep 3, 2020

Yeah, I use this with shortcut lll local language label

<trans-unit id="$KEY$">
    <source>$VALUE$</source>
</trans-unit>$END$

@calien666
Copy link
Author

Yeah, I use this with shortcut lll local language label

<trans-unit id="$KEY$">
    <source>$VALUE$</source>
</trans-unit>$END$

I didn't use this, because if I need a target after source, my cursor is at the correct point. But thanks, this is helpful

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment