i18n
Provides all i18n strings for use by TinyMCE and other javascript dialogs.

@param array $args
@param string $fileExtension
@return string returns json string with translation data
511056
public static function i18n( $args, $fileExtension )
    {
        $lang = '-en';
        $locale = eZLocale::instance();
        if ( $args && $args[0] )
            $lang = $args[0];

        $i18nArray =  array( $lang => array(
            'common' => array(
                'edit_confirm' => ezpI18n::tr( 'design/standard/ezoe', "Do you want to use the WYSIWYG mode for this textarea?"),
                'apply' => ezpI18n::tr( 'design/standard/ezoe', "Apply"),
                'insert' => ezpI18n::tr( 'design/standard/ezoe', "Insert"),
                'update' => ezpI18n::tr( 'design/standard/ezoe', "Update"),
                'cancel' => ezpI18n::tr( 'design/standard/ezoe', "Cancel"),
                'close' => ezpI18n::tr( 'design/standard/ezoe', "Close"),
                'browse' => ezpI18n::tr( 'design/standard/ezoe', "Browse"),
                'class_name' => ezpI18n::tr( 'design/standard/ezoe', "Class"),
                'not_set' => ezpI18n::tr( 'design/standard/ezoe', "-- Not set --"),
                'clipboard_msg' => ezpI18n::tr( 'design/standard/ezoe', "Copy/Cut/Paste is not available in Mozilla and Firefox.\nDo you want more information about this issue?"),
                'clipboard_no_support' => ezpI18n::tr( 'design/standard/ezoe', "Currently not supported by your browser, use keyboard shortcuts instead."),
                'popup_blocked' => ezpI18n::tr( 'design/standard/ezoe', "Sorry, but we have noticed that your popup-blocker has disabled a window that provides application functionality. You will need to disable popup blocking on this site in order to fully utilize this tool."),
                'invalid_data' => ezpI18n::tr( 'design/standard/ezoe', "Error: Invalid values entered, these are marked in red."),
                'more_colors' => ezpI18n::tr( 'design/standard/ezoe', "More colors")
            ),
            'validator_dlg' => array(
                'required' => ezpI18n::tr( 'design/standard/ezoe/validator', '&quot;%label&quot; is required and must have a value', null, array( '%label' => '<label>' )),
                'number' => ezpI18n::tr( 'design/standard/ezoe/validator', '&quot;%label&quot; must be a valid number', null, array( '%label' => '<label>' )),
                'int' => ezpI18n::tr( 'design/standard/ezoe/validator', '&quot;%label&quot; must be a valid integer number', null, array( '%label' => '<label>' )),
                'url' => ezpI18n::tr( 'design/standard/ezoe/validator', '&quot;%label&quot; must be a valid absolute url address', null, array( '%label' => '<label>' )),
                'email' => ezpI18n::tr( 'design/standard/ezoe/validator', '&quot;%label&quot; must be a valid email address', null, array( '%label' => '<label>' )),
                'size' => ezpI18n::tr( 'design/standard/ezoe/validator', '&quot;%label&quot; must be a valid css size/unit value', null, array( '%label' => '<label>' )),
                'html_id' => ezpI18n::tr( 'design/standard/ezoe/validator', '&quot;%label&quot; must be a valid html element id', null, array( '%label' => '<label>' )),
                'min' => ezpI18n::tr( 'design/standard/ezoe/validator', '&quot;%label&quot; must be higher then %min', null, array( '%label' => '<label>', '%min' => '<min>' )),
                'max' => ezpI18n::tr( 'design/standard/ezoe/validator', '&quot;%label&quot; must be lower then %max', null, array( '%label' => '<label>', '%max' => '<max>' )),
            ),
            'contextmenu' => array(
                'align' => ezpI18n::tr( 'design/standard/ezoe', "Alignment"),
                'left' => ezpI18n::tr( 'design/standard/ezoe', "Left"),
                'center' => ezpI18n::tr( 'design/standard/ezoe', "Center"),
                'right' => ezpI18n::tr( 'design/standard/ezoe', "Right"),
                'full' => ezpI18n::tr( 'design/standard/ezoe', "Full")
            ),
            'insertdatetime' => array(
                'date_fmt' => ezpI18n::tr( 'design/standard/ezoe', "%Y-%m-%d"),
                'time_fmt' => ezpI18n::tr( 'design/standard/ezoe', "%H:%M:%S"),
                'insertdate_desc' => ezpI18n::tr( 'design/standard/ezoe', "Insert date"),
                'inserttime_desc' => ezpI18n::tr( 'design/standard/ezoe', "Insert time"),
                'months_long' => implode(',', $locale->LongMonthNames ),
                'months_short' => implode(',', $locale->ShortMonthNames ),
                'day_long' => implode( ',', $locale->LongDayNames ) . ',' . $locale->longDayName(0),
                'day_short' => implode( ',', $locale->ShortDayNames ) . ',' . $locale->shortDayName(0)
            ),
            'print' => array(
                'print_desc' => ezpI18n::tr( 'design/standard/ezoe', "Print")
            ),
            'preview' => array(
                'preview_desc' => ezpI18n::tr( 'design/standard/ezoe', "Preview")
            ),
            'directionality' => array(
                'ltr_desc' => ezpI18n::tr( 'design/standard/ezoe', "Direction left to right"),
                'rtl_desc' => ezpI18n::tr( 'design/standard/ezoe', "Direction right to left")
            ),
            /*'layer' => array(
                'insertlayer_desc' => ezpI18n::tr( 'design/standard/ezoe', "Insert new layer"),
                'forward_desc' => ezpI18n::tr( 'design/standard/ezoe', "Move forward"),
                'backward_desc' => ezpI18n::tr( 'design/standard/ezoe', "Move backward"),
                'absolute_desc' => ezpI18n::tr( 'design/standard/ezoe', "Toggle absolute positioning"),
                'content' => ezpI18n::tr( 'design/standard/ezoe', "New layer...")
            ),*/
            'save' => array(
                'save_desc' => ezpI18n::tr( 'design/standard/ezoe', "Save"),
                'cancel_desc' => ezpI18n::tr( 'design/standard/ezoe', "Cancel all changes")
            ),
            'nonbreaking' => array(
                'nonbreaking_desc' => ezpI18n::tr( 'design/standard/ezoe', "Insert non-breaking space character")
            ),
            'iespell' => array(
                'iespell_desc' => ezpI18n::tr( 'design/standard/ezoe', "Run spell checking"),
                'download' => ezpI18n::tr( 'design/standard/ezoe', "ieSpell not detected. Do you want to install it now?")
            ),
            'advhr' => array(
                'advhr_desc' => ezpI18n::tr( 'design/standard/ezoe', "Horizontale rule")
            ),
            'emotions' => array(
                'emotions_desc' => ezpI18n::tr( 'design/standard/ezoe', "Emotions")
            ),
            'emotions_dlg' => array(
                'title' => ezpI18n::tr( 'design/standard/ezoe', "Insert emotion"),
                'desc' => ezpI18n::tr( 'design/standard/ezoe', "Emotions"),
                'cool' => ezpI18n::tr( 'design/standard/ezoe', "Cool"),
                'cry' => ezpI18n::tr( 'design/standard/ezoe', "Cry"),
                'embarassed' => ezpI18n::tr( 'design/standard/ezoe', "Embarassed"),
                'foot_in_mouth' => ezpI18n::tr( 'design/standard/ezoe', "Foot in mouth"),
                'frown' => ezpI18n::tr( 'design/standard/ezoe', "Frown"),
                'innocent' => ezpI18n::tr( 'design/standard/ezoe', "Innocent"),
                'kiss' => ezpI18n::tr( 'design/standard/ezoe', "Kiss"),
                'laughing' => ezpI18n::tr( 'design/standard/ezoe', "Laughing"),
                'money_mouth' => ezpI18n::tr( 'design/standard/ezoe', "Money mouth"),
                'sealed' => ezpI18n::tr( 'design/standard/ezoe', "Sealed"),
                'smile' => ezpI18n::tr( 'design/standard/ezoe', "Smile"),
                'surprised' => ezpI18n::tr( 'design/standard/ezoe', "Surprised"),
                'tongue_out' => ezpI18n::tr( 'design/standard/ezoe', "Tongue out"),
                'undecided' => ezpI18n::tr( 'design/standard/ezoe', "Undecided"),
                'wink' => ezpI18n::tr( 'design/standard/ezoe', "Wink"),
                'usage' => ezpI18n::tr( 'design/standard/ezoe', "Use left and right arrows to navigate."),
                'yell' => ezpI18n::tr( 'design/standard/ezoe', "Yell"),
            ),
            'searchreplace' => array(
                'search_desc' => ezpI18n::tr( 'design/standard/ezoe', "Find"),
                'replace_desc' => ezpI18n::tr( 'design/standard/ezoe', "Find/Replace")
            ),
            /*'advimage' => array(
                'image_desc' => ezpI18n::tr( 'design/standard/ezoe', "Insert/edit image")
            ),
            'advlink' => array(
                'link_desc' => ezpI18n::tr( 'design/standard/ezoe', "Insert/edit link")
            ),
            'xhtmlxtras' => array(
                'cite_desc' => ezpI18n::tr( 'design/standard/ezoe', "Citation"),
                'abbr_desc' => ezpI18n::tr( 'design/standard/ezoe', "Abbreviation"),
                'acronym_desc' => ezpI18n::tr( 'design/standard/ezoe', "Acronym"),
                'del_desc' => ezpI18n::tr( 'design/standard/ezoe', "Deletion"),
                'ins_desc' => ezpI18n::tr( 'design/standard/ezoe', "Insertion"),
                'attribs_desc' => ezpI18n::tr( 'design/standard/ezoe', "Insert/Edit Attributes")
            ),
            'style' => array(
                'desc' => ezpI18n::tr( 'design/standard/ezoe', "Edit CSS Style")
            ),*/
            'paste' => array(
                'paste_text_desc' => ezpI18n::tr( 'design/standard/ezoe', "Paste as Plain Text"),
                'paste_word_desc' => ezpI18n::tr( 'design/standard/ezoe', "Paste from Word"),
                'selectall_desc' => ezpI18n::tr( 'design/standard/ezoe', "Select All"),
                'plaintext_mode_sticky' => ezpI18n::tr( 'design/standard/ezoe', "Paste is now in plain text mode. Click again to toggle back to regular paste mode. After you paste something you will be returned to regular paste mode."),
                'plaintext_mode' => ezpI18n::tr( 'design/standard/ezoe', "Paste is now in plain text mode. Click again to toggle back to regular paste mode."),
            ),
            'paste_dlg' => array(
                'text_title' => ezpI18n::tr( 'design/standard/ezoe', "Use CTRL+V on your keyboard to paste the text into the window."),
                'text_linebreaks' => ezpI18n::tr( 'design/standard/ezoe', "Keep linebreaks"),
                'word_title' => ezpI18n::tr( 'design/standard/ezoe', "Use CTRL+V on your keyboard to paste the text into the window.")
            ),
            'table' => array(
                'desc' => ezpI18n::tr( 'design/standard/ezoe', "Inserts a new table"),
                'row_before_desc' => ezpI18n::tr( 'design/standard/ezoe', "Insert row before"),
                'row_after_desc' => ezpI18n::tr( 'design/standard/ezoe', "Insert row after"),
                'delete_row_desc' => ezpI18n::tr( 'design/standard/ezoe', "Delete row"),
                'col_before_desc' => ezpI18n::tr( 'design/standard/ezoe', "Insert column before"),
                'col_after_desc' => ezpI18n::tr( 'design/standard/ezoe', "Insert column after"),
                'delete_col_desc' => ezpI18n::tr( 'design/standard/ezoe', "Remove column"),
                'split_cells_desc' => ezpI18n::tr( 'design/standard/ezoe', "Split merged table cells"),
                'merge_cells_desc' => ezpI18n::tr( 'design/standard/ezoe', "Merge table cells"),
                'row_desc' => ezpI18n::tr( 'design/standard/ezoe', "Table row properties"),
                'cell_desc' => ezpI18n::tr( 'design/standard/ezoe', "Table cell properties"),
                'props_desc' => ezpI18n::tr( 'design/standard/ezoe', "Table properties"),
                'paste_row_before_desc' => ezpI18n::tr( 'design/standard/ezoe', "Paste table row before"),
                'paste_row_after_desc' => ezpI18n::tr( 'design/standard/ezoe', "Paste table row after"),
                'cut_row_desc' => ezpI18n::tr( 'design/standard/ezoe', "Cut table row"),
                'copy_row_desc' => ezpI18n::tr( 'design/standard/ezoe', "Copy table row"),
                'del' => ezpI18n::tr( 'design/standard/ezoe', "Delete table"),
                'row' => ezpI18n::tr( 'design/standard/ezoe', "Row"),
                'col' => ezpI18n::tr( 'design/standard/ezoe', "Column"),
                'rows' => ezpI18n::tr( 'design/standard/ezoe', "Rows"),
                'cols' => ezpI18n::tr( 'design/standard/ezoe', "Columns"),
                'cell' => ezpI18n::tr( 'design/standard/ezoe', "Cell")
            ),
            'autosave' => array(
                'unload_msg' => ezpI18n::tr( 'design/standard/ezoe', "The changes you made will be lost if you navigate away from this page.")
            ),
            'fullscreen' => array(
                'desc' => ezpI18n::tr( 'design/standard/ezoe', "Toggle fullscreen mode")
            ),
            'media' => array(
                'desc' => ezpI18n::tr( 'design/standard/ezoe', "Insert / edit embedded media"),
                'edit' => ezpI18n::tr( 'design/standard/ezoe', "Edit embedded media")
            ),
            'fullpage' => array(
                'desc' => ezpI18n::tr( 'design/standard/ezoe', "Document properties")
            ),
            'template' => array(
                'desc' => ezpI18n::tr( 'design/standard/ezoe', "Insert predefined template content")
            ),
            'visualchars' => array(
                'desc' => ezpI18n::tr( 'design/standard/ezoe', "Visual control characters on/off.")
            ),
            'spellchecker' => array(
                'desc' => ezpI18n::tr( 'design/standard/ezoe', "Toggle spellchecker"),
                'menu' => ezpI18n::tr( 'design/standard/ezoe', "Spellchecker settings"),
                'ignore_word' => ezpI18n::tr( 'design/standard/ezoe', "Ignore word"),
                'ignore_words' => ezpI18n::tr( 'design/standard/ezoe', "Ignore all"),
                'langs' => ezpI18n::tr( 'design/standard/ezoe', "Languages"),
                'wait' => ezpI18n::tr( 'design/standard/ezoe', "Please wait..."),
                'sug' => ezpI18n::tr( 'design/standard/ezoe', "Suggestions"),
                'no_sug' => ezpI18n::tr( 'design/standard/ezoe', "No suggestions"),
                'no_mpell' => ezpI18n::tr( 'design/standard/ezoe', "No misspellings found.")
            ),
            'pagebreak' => array(
                'desc' => ezpI18n::tr( 'design/standard/ezoe', "Insert page break.")
            ),
            'advanced' => array(
                'style_select' => ezpI18n::tr( 'design/standard/ezoe', "Styles"),
                //'font_size' => ezpI18n::tr( 'design/standard/ezoe', "Font size"),
                //'fontdefault' => ezpI18n::tr( 'design/standard/ezoe', "Font family"),
                'block' => ezpI18n::tr( 'design/standard/ezoe', "Format"),
                'paragraph' => ezpI18n::tr( 'design/standard/ezoe', "Paragraph"),
                'div' => ezpI18n::tr( 'design/standard/ezoe', "Div"),
                //'address' => ezpI18n::tr( 'design/standard/ezoe', "Address"),
                'pre' => ezpI18n::tr( 'design/standard/ezoe', "Literal"),
                'h1' => ezpI18n::tr( 'design/standard/ezoe', "Heading 1"),
                'h2' => ezpI18n::tr( 'design/standard/ezoe', "Heading 2"),
                'h3' => ezpI18n::tr( 'design/standard/ezoe', "Heading 3"),
                'h4' => ezpI18n::tr( 'design/standard/ezoe', "Heading 4"),
                'h5' => ezpI18n::tr( 'design/standard/ezoe', "Heading 5"),
                'h6' => ezpI18n::tr( 'design/standard/ezoe', "Heading 6"),
                //'blockquote' => ezpI18n::tr( 'design/standard/ezoe', "Blockquote"),
                'code' => ezpI18n::tr( 'design/standard/ezoe', "Code"),
                'samp' => ezpI18n::tr( 'design/standard/ezoe', "Code sample"),
                'dt' => ezpI18n::tr( 'design/standard/ezoe', "Definition term"),
                'dd' => ezpI18n::tr( 'design/standard/ezoe', "Definition description"),
                'bold_desc' => ezpI18n::tr( 'design/standard/ezoe', "Bold (Ctrl+B)"),
                'italic_desc' => ezpI18n::tr( 'design/standard/ezoe', "Italic (Ctrl+I)"),
                'underline_desc' => ezpI18n::tr( 'design/standard/ezoe', "Underline (Ctrl+U)"),
                'striketrough_desc' => ezpI18n::tr( 'design/standard/ezoe', "Strikethrough"),
                'justifyleft_desc' => ezpI18n::tr( 'design/standard/ezoe', "Align left"),
                'justifycenter_desc' => ezpI18n::tr( 'design/standard/ezoe', "Align center"),
                'justifyright_desc' => ezpI18n::tr( 'design/standard/ezoe', "Align right"),
                'justifyfull_desc' => ezpI18n::tr( 'design/standard/ezoe', "Align full"),
                'bullist_desc' => ezpI18n::tr( 'design/standard/ezoe', "Unordered list"),
                'numlist_desc' => ezpI18n::tr( 'design/standard/ezoe', "Ordered list"),
                'outdent_desc' => ezpI18n::tr( 'design/standard/ezoe', "Outdent"),
                'indent_desc' => ezpI18n::tr( 'design/standard/ezoe', "Indent"),
                'undo_desc' => ezpI18n::tr( 'design/standard/ezoe', "Undo (Ctrl+Z)"),
                'redo_desc' => ezpI18n::tr( 'design/standard/ezoe', "Redo (Ctrl+Y)"),
                'link_desc' => ezpI18n::tr( 'design/standard/ezoe', "Insert/edit link"),
                'unlink_desc' => ezpI18n::tr( 'design/standard/ezoe', "Unlink"),
                'image_desc' => ezpI18n::tr( 'design/standard/ezoe', "Insert/edit image"),

                'object_desc' => ezpI18n::tr( 'design/standard/ezoe', "Insert/edit object"),
                'file_desc' => ezpI18n::tr( 'design/standard/ezoe', "Insert/edit file"),
                'custom_desc' => ezpI18n::tr( 'design/standard/ezoe', "Insert custom tag"),
                'literal_desc' => ezpI18n::tr( 'design/standard/ezoe', "Insert literal text"),
                'pagebreak_desc' => ezpI18n::tr( 'design/standard/ezoe', "Insert pagebreak"),
                'disable_desc' => ezpI18n::tr( 'design/standard/content/datatype', "Disable editor"),
                'store_desc' => ezpI18n::tr( 'design/standard/content/edit', "Store draft"),
                'publish_desc' => ezpI18n::tr( 'design/standard/content/edit', "Send for publishing"),
                'discard_desc' => ezpI18n::tr( 'design/standard/content/edit', "Discard"),

                'cleanup_desc' => ezpI18n::tr( 'design/standard/ezoe', "Cleanup messy code"),
                'code_desc' => ezpI18n::tr( 'design/standard/ezoe', "Edit HTML Source"),
                'sub_desc' => ezpI18n::tr( 'design/standard/ezoe', "Subscript"),
                'sup_desc' => ezpI18n::tr( 'design/standard/ezoe', "Superscript"),
                'hr_desc' => ezpI18n::tr( 'design/standard/ezoe', "Insert horizontal ruler"),
                'removeformat_desc' => ezpI18n::tr( 'design/standard/ezoe', "Remove formatting"),
                'custom1_desc' => ezpI18n::tr( 'design/standard/ezoe', "Your custom description here"),
                //'forecolor_desc' => ezpI18n::tr( 'design/standard/ezoe', "Select text color"),
                //'backcolor_desc' => ezpI18n::tr( 'design/standard/ezoe', "Select background color"),
                'charmap_desc' => ezpI18n::tr( 'design/standard/ezoe', "Insert special character"),
                'visualaid_desc' => ezpI18n::tr( 'design/standard/ezoe', "Toggle guidelines/invisible elements"),
                'anchor_desc' => ezpI18n::tr( 'design/standard/ezoe', "Insert/edit anchor"),
                'cut_desc' => ezpI18n::tr( 'design/standard/ezoe', "Cut"),
                'copy_desc' => ezpI18n::tr( 'design/standard/ezoe', "Copy"),
                'paste_desc' => ezpI18n::tr( 'design/standard/ezoe', "Paste"),
                'image_props_desc' => ezpI18n::tr( 'design/standard/ezoe', "Image properties"),
                'newdocument_desc' => ezpI18n::tr( 'design/standard/ezoe', "New document"),
                'help_desc' => ezpI18n::tr( 'design/standard/ezoe', "Help"),
                //'blockquote_desc' => ezpI18n::tr( 'design/standard/ezoe', "Blockquote"),
                'clipboard_msg' => ezpI18n::tr( 'design/standard/ezoe', "Copy/Cut/Paste is not available in Mozilla and Firefox.\nDo you want more information about this issue?"),
                'path' => ezpI18n::tr( 'design/standard/ezoe', "Path"),
                'newdocument' => ezpI18n::tr( 'design/standard/ezoe', "Are you sure you want clear all contents?"),
                'toolbar_focus' => ezpI18n::tr( 'design/standard/ezoe', "Jump to tool buttons - Alt+Q, Jump to editor - Alt-Z, Jump to element path - Alt-X"),
                //'more_colors' => ezpI18n::tr( 'design/standard/ezoe', "More colors"),
                'next' => ezpI18n::tr( 'design/standard/ezoe', "Next"),
                'previous' => ezpI18n::tr( 'design/standard/ezoe', "Previous"),
                'select' => ezpI18n::tr( 'design/standard/ezoe', "Select"),
                'type' => ezpI18n::tr( 'design/standard/ezoe', "Type")
            ),
            'advanced_dlg' => array(
                //'about_title' => ezpI18n::tr( 'design/standard/ezoe', "Moxiecode TinyMCE"),
                'about_general' => ezpI18n::tr( 'design/standard/ezoe', "About"),
                'about_help' => ezpI18n::tr( 'design/standard/ezoe', "Help"),
                'about_license' => ezpI18n::tr( 'design/standard/ezoe', "License"),
                'about_plugins' => ezpI18n::tr( 'design/standard/ezoe', "Plugins"),
                'about_plugin' => ezpI18n::tr( 'design/standard/ezoe', "Plugin"),
                'about_author' => ezpI18n::tr( 'design/standard/ezoe', "Author"),
                'about_version' => ezpI18n::tr( 'design/standard/ezoe', "Version"),
                'about_loaded' => ezpI18n::tr( 'design/standard/ezoe', "Loaded plugins"),
                /*'anchor_title' => ezpI18n::tr( 'design/standard/ezoe', "Insert/edit anchor"),
                'anchor_name' => ezpI18n::tr( 'design/standard/ezoe', "Anchor name"),*/
                'code_title' => ezpI18n::tr( 'design/standard/ezoe', "HTML Source Editor"),
                'code_wordwrap' => ezpI18n::tr( 'design/standard/ezoe', "Word wrap"),
                'colorpicker_title' => ezpI18n::tr( 'design/standard/ezoe', "Select a color"),
                'colorpicker_picker_tab' => ezpI18n::tr( 'design/standard/ezoe', "Picker"),
                'colorpicker_picker_title' => ezpI18n::tr( 'design/standard/ezoe', "Color picker"),
                'colorpicker_palette_tab' => ezpI18n::tr( 'design/standard/ezoe', "Palette"),
                'colorpicker_palette_title' => ezpI18n::tr( 'design/standard/ezoe', "Palette colors"),
                'colorpicker_named_tab' => ezpI18n::tr( 'design/standard/ezoe', "Named"),
                'colorpicker_named_title' => ezpI18n::tr( 'design/standard/ezoe', "Named colors"),
                'colorpicker_color' => ezpI18n::tr( 'design/standard/ezoe', "Color"),
                'colorpicker_name' => ezpI18n::tr( 'design/standard/ezoe', "Name"),
                'charmap_usage' => ezpI18n::tr( 'design/standard/ezoe', "Use left and right arrows to navigate."),
                'charmap_title' => ezpI18n::tr( 'design/standard/ezoe', "Select special character")/*,
                'image_title' => ezpI18n::tr( 'design/standard/ezoe', "Insert/edit image"),
                'image_src' => ezpI18n::tr( 'design/standard/ezoe', "Image URL"),
                'image_alt' => ezpI18n::tr( 'design/standard/ezoe', "Image description"),
                'image_list' => ezpI18n::tr( 'design/standard/ezoe', "Image list"),
                'image_border' => ezpI18n::tr( 'design/standard/ezoe', "Border"),
                'image_dimensions' => ezpI18n::tr( 'design/standard/ezoe', "Dimensions"),
                'image_vspace' => ezpI18n::tr( 'design/standard/ezoe', "Vertical space"),
                'image_hspace' => ezpI18n::tr( 'design/standard/ezoe', "Horizontal space"),
                'image_align' => ezpI18n::tr( 'design/standard/ezoe', "Alignment"),
                'image_align_baseline' => ezpI18n::tr( 'design/standard/ezoe', "Baseline"),
                'image_align_top' => ezpI18n::tr( 'design/standard/ezoe', "Top"),
                'image_align_middle' => ezpI18n::tr( 'design/standard/ezoe', "Middle"),
                'image_align_bottom' => ezpI18n::tr( 'design/standard/ezoe', "Bottom"),
                'image_align_texttop' => ezpI18n::tr( 'design/standard/ezoe', "Text top"),
                'image_align_textbottom' => ezpI18n::tr( 'design/standard/ezoe', "Text bottom"),
                'image_align_left' => ezpI18n::tr( 'design/standard/ezoe', "Left"),
                'image_align_right' => ezpI18n::tr( 'design/standard/ezoe', "Right"),
                'link_title' => ezpI18n::tr( 'design/standard/ezoe', "Insert/edit link"),
                'link_url' => ezpI18n::tr( 'design/standard/ezoe', "Link URL"),
                'link_target' => ezpI18n::tr( 'design/standard/ezoe', "Target"),
                'link_target_same' => ezpI18n::tr( 'design/standard/ezoe', "Open link in the same window"),
                'link_target_blank' => ezpI18n::tr( 'design/standard/ezoe', "Open link in a new window")/*,
                'link_titlefield' => ezpI18n::tr( 'design/standard/ezoe', "Title"),
                'link_is_email' => ezpI18n::tr( 'design/standard/ezoe', "The URL you entered seems to be an email address, do you want to add the required mailto: prefix?"),
                'link_is_external' => ezpI18n::tr( 'design/standard/ezoe', "The URL you entered seems to external link, do you want to add the required http:// prefix?"),
                'link_list' => ezpI18n::tr( 'design/standard/ezoe', "Link list")*/
            ),
            'ez' => array(
                'root_node_name' => ezpI18n::tr( 'kernel/content', 'Top Level Nodes'),
                'empty_search_result' => ezpI18n::tr( 'design/standard/content/search', 'No results were found when searching for &quot;%1&quot;', null, array( '%1' => '<search_string>' )),
                'empty_bookmarks_result' => ezpI18n::tr( 'design/standard/content/view', 'You have no bookmarks')
            ),
            'searchreplace_dlg' => array(
                'searchnext_desc' => ezpI18n::tr('design/standard/ezoe/searchreplace', "Find again"),
                'notfound' => ezpI18n::tr('design/standard/ezoe/searchreplace', "The search has been completed. The search string could not be found."),
                'search_title' => ezpI18n::tr('design/standard/ezoe/searchreplace', "Find"),
                'replace_title' => ezpI18n::tr('design/standard/ezoe/searchreplace', "Find/Replace"),
                'allreplaced' => ezpI18n::tr('design/standard/ezoe/searchreplace', "All occurrences of the search string were replaced."),
                'findwhat' => ezpI18n::tr('design/standard/ezoe/searchreplace', "Find what"),
                'replacewith' => ezpI18n::tr('design/standard/ezoe/searchreplace', "Replace with"),
                'direction' => ezpI18n::tr('design/standard/ezoe/searchreplace', "Direction"),
                'up' => ezpI18n::tr('design/standard/ezoe/searchreplace', "Up"),
                'down' => ezpI18n::tr('design/standard/ezoe/searchreplace', "Down"),
                'mcase' => ezpI18n::tr('design/standard/ezoe/searchreplace', "Match case"),
                'findnext' => ezpI18n::tr('design/standard/ezoe/searchreplace', "Find next"),
                'replace' => ezpI18n::tr('design/standard/ezoe/searchreplace', "Replace"),
                'replaceall' => ezpI18n::tr('design/standard/ezoe/searchreplace', "Replace all")
            ),
        ));
        $i18nString = json_encode( $i18nArray );

        return 'tinyMCE.addI18n( ' . $i18nString . ' );';
    }
1262566
public function formatArgs($args)
    {
        // The first argument is always the file
        unset($args[0]);

        if (isset($args[1])) {
            $command = explode(':', $args[1]);
            unset($args[1]);
        } else {
            // No Command Specified.
            return array();
        }

        try {

            $action = (isset($command[1]) ? $command[1] : 'main');
            $cmd = $this->library->find($command[0].':'.$action);
            $task = get_class($cmd);

            return array(
                'task'      => $task,
                'action'    => $action,
                'params'    => $args
            );

        } catch (\Exception $e) {

            // No Command FOUND
            return array();
        }
    }
552828
public function translate($string, array $args = [], array $options = [])
    {
        $translation = new TranslationManager(new LanguageDefault([]));

        return new TranslatableMarkup($string, $args, $options, $translation);
    }
957706
function findI18nKeysAndStrings(filePath) {
    const textContentRegEx = /data-i18n="(.*?)".*?>\s*(.*?)\s*</gs;
    const placeholderRegEx = /data-i18n-placeholder="(.*?)"(?:.*?placeholder="(.*?)")?/g;
    const phraseRegEx = /translatePhrase\('(.*?)'\)/g;

    // Get global variable
    const contents = fs.readFileSync(filePath).toString();

    /** @type {object} */
    const dict = {};

    let textMatch;
    while ((textMatch = textContentRegEx.exec(contents)) !== null) { // eslint-disable-line no-cond-assign
        const key = textMatch[1];
        const phrase = textMatch[2];
        dict[key] = phrase;
    }

    let placeholderMatch;
    while ((placeholderMatch = placeholderRegEx.exec(contents)) !== null) { // eslint-disable-line no-cond-assign
        const key = placeholderMatch[1];
        const phrase = placeholderMatch[2] || '- not found -';
        dict[key] = phrase;
    }

    let phraseMatch;
    while ((phraseMatch = phraseRegEx.exec(contents)) !== null) { // eslint-disable-line no-cond-assign
        const key = phraseMatch[1];
        const phrase = false;
        dict[key] = phrase;
    }

    return dict;
}
1002137
private function getTranslationsInFile($filePath)
    {
        
	 	// File extension ?
        $extOk = in_array(\Jig\Utils\FsUtils::getFileExtension($filePath), $this->getFileTypes());

        if ($extOk){
            foreach ($this->getBannedFileType() as $bannedExt){
                $extOk &= substr_compare($filePath, $bannedExt, strlen($filePath)-strlen($bannedExt), strlen($bannedExt)) !== 0;
            }
        }

        if ($extOk) {
            
		 	// We read the file.
		 	$lines = file($filePath);
		 	foreach ($lines as $line) {
                $strings = $this->getTranslationPhrases( $line );
                //preg_match_all("/__(\(| )+['\"](.*?)['\"](\))?/u", $line, $string);
                
                //lookup for __('to translate') or __ 'to translate'
            //    preg_match_all("/__(\(| )+(('(.*?)')|(\"(.*?)\"))(\))?/u", $line, $string);
            
                foreach($strings as $s) {
                    $tu = new tao_helpers_translation_TranslationUnit();
                    $tu->setSource(tao_helpers_translation_POUtils::sanitize($s));
                    $tus = $this->getTranslationUnits();
                    $found = false;
                    
                    // We must add the string as a new TranslationUnit only
                    // if a similiar source does not exist.
                    foreach ($tus as $t) {
                        if ($tu->getSource() == $t->getSource()) {
                            $found = true;
                            break;
                        }
                    }
                    
                    if (!$found) {
                        $tus[] = $tu;
                        $this->setTranslationUnits($tus);
                    }
                }
		 	}
		}
        
    }
856149
public static function includeFileExtension($fileName, $extension)
    {
        $fileExtension = self::getFileExtension($fileName, true);

        /*
         * File has given extension?
         * Nothing to do
         */
        if ($fileExtension === strtolower($extension)) {
            return $fileName;
        }

        return sprintf('%s.%s', $fileName, $extension);
    }
363492
protected function makeCommand($outputDirectory, $outputExtension)
    {
        $oriFile = escapeshellarg($this->file);
        $outputDirectory = escapeshellarg($outputDirectory);

        return "{$this->bin} --headless --convert-to {$outputExtension} {$oriFile} --outdir {$outputDirectory}";
    }
431957
@Transformer(requireTemplate = true)
    public static String i18n(Object key, Object... args) {
        return i18n(null, key, args);
    }
1214724
public static function detectByFileExtension(string $extension): string
    {
        static $extToMimeTypeMap;

        if (! $extToMimeTypeMap) {
            $extToMimeTypeMap = static::getExtensionToMimeTypeMap();
        }

        if (isset($extToMimeTypeMap[$extension])) {
            return $extToMimeTypeMap[$extension];
        }

        return 'text/plain';
    }
1251079
protected String getI18n(final String aMessageKey, final Object... aObjArray) {
        final String[] strings = new String[aObjArray.length];

        for (int index = 0; index < aObjArray.length; index++) {
            if (aObjArray[index] instanceof File) {
                strings[index] = ((File) aObjArray[index]).getAbsolutePath();
            } else {
                strings[index] = aObjArray[index].toString();
            }
        }

        return StringUtils.normalizeWS(myBundle.get(aMessageKey, strings));
    }
946079
private function formatArgs(array $args)
    {
        $result = array();
        foreach ($args as $key => $item) {
            if ('object' === $item[0]) {
                $formattedValue = sprintf("<em>object</em>(%s)", $this->abbrClass($item[1]));
            } elseif ('array' === $item[0]) {
                $formattedValue = sprintf("<em>array</em>(%s)", is_array($item[1]) ? $this->formatArgs($item[1]) : $item[1]);
            } elseif ('string'  === $item[0]) {
                $formattedValue = sprintf("'%s'", htmlspecialchars($item[1], ENT_QUOTES | ENT_SUBSTITUTE, $this->charset));
            } elseif ('null' === $item[0]) {
                $formattedValue = '<em>null</em>';
            } elseif ('boolean' === $item[0]) {
                $formattedValue = '<em>' . strtolower(var_export($item[1], true)) . '</em>';
            } elseif ('resource' === $item[0]) {
                $formattedValue = '<em>resource</em>';
            } else {
                $formattedValue = str_replace("\n", '', var_export(htmlspecialchars((string) $item[1], ENT_QUOTES | ENT_SUBSTITUTE, $this->charset), true));
            }

            $result[] = is_int($key) ? $formattedValue : sprintf("'%s' => %s", $key, $formattedValue);
        }

        return implode(', ', $result);
    }
1335532
private function getExtendedFieldFilters($args, $extendedFieldList)
    {
        $result = [];
        if (isset($args['filter'])) {
            foreach (array_keys($extendedFieldList) as $alias) {
                // @todo - Instead of strpos use regex w/ word boundry, loop below needs cleanup.
                if (
                    isset($args['filter']['string'])
                    && (
                        (
                            is_string($args['filter']['string']) && false !== strpos(
                                $args['filter']['string'],
                                $alias
                            )
                        )
                        || (
                            is_string($args['filter']['force']) && false !== strpos(
                                $args['filter']['force'],
                                $alias
                            )
                        )
                    )
                ) {
                    // field is in the filter array somewhere
                    $result[$alias] = $extendedFieldList[$alias];
                    continue;
                }
                $extendedFieldLength = strlen($alias);
                foreach (['string', 'force'] as $type) {
                    if (
                        isset($args['filter'][$type])
                        && is_array($args['filter'][$type])
                    ) {
                        foreach ($args['filter'][$type] as $filter) {
                            if (isset($filter['column'])) {
                                if (substr(
                                        $filter['column'],
                                        strlen($filter['column']) - $extendedFieldLength - 1
                                    ) == '.'.$alias) {
                                    $result[$alias] = $extendedFieldList[$alias];
                                    continue;
                                }
                            }
                        }
                    }
                }
            }
        }

        return $result;
    }
201226
protected function getAdapterNamespaceGivenExtension($fileExtension)
    {
        $adapterNamespace = '\Mmoreram\Extractor\Adapter\\';

        switch ($fileExtension) {

            case 'zip':
                $adapterNamespace .= 'ZipExtractorAdapter';
                break;

            case 'rar':
                $adapterNamespace .= 'RarExtractorAdapter';
                break;

            case 'phar':
                $adapterNamespace .= 'PharExtractorAdapter';
                break;

            case 'tar':
                $adapterNamespace .= 'TarExtractorAdapter';
                break;

            case 'gz':
                $adapterNamespace .= 'TarGzExtractorAdapter';
                break;

            case 'bz2':
                $adapterNamespace .= 'TarBz2ExtractorAdapter';
                break;

            default:
                throw new ExtensionNotSupportedException($fileExtension);
        }

        return $adapterNamespace;
    }
116052
public static GeneratedScript script(final String script, final String[] args, final String fileExtension) {
        return new GeneratedScriptBuilder(script, args, fileExtension);
    }
797490
protected function normalizeArgs(array $args)
    {
        $args += [
            'numTranslators' => '',
            'limitToLocale' => '',
        ];
        $valn = $this->app->make(Numbers::class);
        $normalized = [
            'numTranslators' => $valn->integer($args['numTranslators'], 1) ? (int) $args['numTranslators'] : null,
            'allTranslations' => empty($args['allTranslations']) ? 0 : 1,
            'limitToLocale' => '',
        ];
        if ($args['limitToLocale'] !== '') {
            $locale = $this->app->make(LocaleRepository::class)->findApproved($args['limitToLocale']);
            if ($locale !== null) {
                $normalized['limitToLocale'] = $locale->getID();
            }
        }

        return $normalized;
    }
1204278
protected function formatArgs(array $args)
    {
        $result = array();
        foreach ($args as $key => $item) {
            if ('object' === $item[0]) {
                $formattedValue = sprintf('<em>object</em>(%s)', $this->formatClass($item[1]));
            } elseif ('array' === $item[0]) {
                $formattedValue = sprintf('<em>array</em>(%s)', is_array($item[1]) ? $this->formatArgs($item[1]) : $item[1]);
            } elseif ('string' === $item[0]) {
                $formattedValue = sprintf("'%s'", $this->escapeHtml($item[1]));
            } elseif ('null' === $item[0]) {
                $formattedValue = '<em>null</em>';
            } elseif ('boolean' === $item[0]) {
                $formattedValue = '<em>'.strtolower(var_export($item[1], true)).'</em>';
            } elseif ('resource' === $item[0]) {
                $formattedValue = '<em>resource</em>';
            } else {
                $formattedValue = str_replace("\n", '', var_export($this->escapeHtml((string) $item[1]), true));
            }

            $result[] = is_int($key) ? $formattedValue : sprintf("'%s' => %s", $key, $formattedValue);
        }

        return implode(', ', $result);
    }
1231834
public function getFormat()
    {
        try {
            $fileObj = new SplFileObject($this->getName(true) , 'r');
        } catch ( RuntimeException $ex ) {
            throw new FileExistException('The provided file is not readable' , $ex);
        }

        return $fileObj->getExtension();
    }