Here is a PHP file with a sample array definition:

<?php

$lang["username"] = "Username";
$lang["password"] = "Enter password";
$lang["app"] = "Lokalise";

By default, the variable name is $lang but you may provide any other name, for example $_["username"]. During the export, a variable with the same name will be used as well. Note, however, that while custom variable names are supported, this feature has certain limitations:

  • The custom variable name is being set only if you're importing a file with new keys (meaning this name is not updatable).
  • The custom variable name cannot be modified using Lokalise editor.
  • You can't have different custom variables in a single file.
Did this answer your question?