| 1 |
<?php |
| 2 |
namespace FileBird; |
| 3 |
|
| 4 |
defined( 'ABSPATH' ) || exit; |
| 5 |
/** |
| 6 |
* I18n Logic |
| 7 |
*/ |
| 8 |
class I18n { |
| 9 |
public function __construct() { |
| 10 |
add_action( 'init', array( $this, 'loadPluginTextdomain' ) ); |
| 11 |
} |
| 12 |
|
| 13 |
public function loadPluginTextdomain() { |
| 14 |
if ( function_exists( 'determine_locale' ) ) { |
| 15 |
$locale = determine_locale(); |
| 16 |
} else { |
| 17 |
$locale = is_admin() ? get_user_locale() : get_locale(); |
| 18 |
} |
| 19 |
unload_textdomain( 'filebird' ); |
| 20 |
load_textdomain( 'filebird', WP_LANG_DIR . '/plugins/filebird-' . $locale . '.mo' ); |
| 21 |
load_plugin_textdomain( 'filebird', false, NJFB_PLUGIN_PATH . '/i18n/languages/' ); |
| 22 |
} |
| 23 |
|
| 24 |
public static function getTranslation() { |
| 25 |
$translation = array( |
| 26 |
'noMedia' => __( 'No media files found.', 'filebird' ), |
| 27 |
'new_folder' => __( 'New Folder', 'filebird' ), |
| 28 |
'delete' => __( 'Delete', 'filebird' ), |
| 29 |
'folders' => __( 'Folders', 'filebird' ), |
| 30 |
'ok' => __( 'Ok', 'filebird' ), |
| 31 |
'cancel' => __( 'Cancel', 'filebird' ), |
| 32 |
'close' => __( 'Close', 'filebird' ), |
| 33 |
'cut' => __( 'Cut', 'filebird' ), |
| 34 |
'paste' => __( 'Paste', 'filebird' ), |
| 35 |
'download' => __( 'Download', 'filebird' ), |
| 36 |
'download_pro_version' => __( 'Download (Pro version)', 'filebird' ), |
| 37 |
'loading' => __( 'Loading...', 'filebird' ), |
| 38 |
'generate_download' => __( 'Generating download link...', 'filebird' ), |
| 39 |
'move_done' => __( 'Successfully moved', 'filebird' ), |
| 40 |
'move_error' => __( 'Unsuccessfully moved', 'filebird' ), |
| 41 |
'update_done' => __( 'Successfully updated!', 'filebird' ), |
| 42 |
'update_error' => __( 'Unsuccessfully updated!', 'filebird' ), |
| 43 |
'delete_done' => __( 'Successfully deleted!', 'filebird' ), |
| 44 |
'delete_error' => __( "Can't delete!", 'filebird' ), |
| 45 |
'change_color' => __( 'Change Color', 'filebird' ), |
| 46 |
'save' => __( 'Save', 'filebird' ), |
| 47 |
'save_changes' => __( 'Save Changes', 'filebird' ), |
| 48 |
'folder' => __( 'Folder', 'filebird' ), |
| 49 |
'folder_name_placeholder' => __( 'Folder name...', 'filebird' ), |
| 50 |
'folders' => __( 'Folders', 'filebird' ), |
| 51 |
'enter_folder_name_placeholder' => __( 'Enter folder name...', 'filebird' ), |
| 52 |
'are_you_sure_delete' => __( 'Are you sure you want to delete', 'filebird' ), |
| 53 |
'are_you_sure' => __( 'Are you sure?', 'filebird' ), |
| 54 |
'all_files_will_move' => __( 'Those files will be moved to <strong>Uncategorized</strong> folder.', 'filebird' ), |
| 55 |
'editing_warning' => __( 'You are editing another folder! Please complete the task first!', 'filebird' ), |
| 56 |
'sort_folders' => __( 'Sort Folders', 'filebird' ), |
| 57 |
'delete_folder' => __( 'Delete Folder', 'filebird' ), |
| 58 |
'sort_files' => __( 'Sort Files', 'filebird' ), |
| 59 |
'bulk_select' => __( 'Bulk Select', 'filebird' ), |
| 60 |
'all_files' => __( 'All Files', 'filebird' ), |
| 61 |
'uncategorized' => __( 'Uncategorized', 'filebird' ), |
| 62 |
'previous_folder_selected' => __( 'Previous folder selected', 'filebird' ), |
| 63 |
'rename' => __( 'Rename', 'filebird' ), |
| 64 |
'are_you_sure_delete_this_folder' => __( 'Are you sure you want to delete this folder? Those files will be moved to <strong>Uncategorized</strong> folder.', 'filebird' ), |
| 65 |
'sort_ascending' => __( 'Sort Ascending', 'filebird' ), |
| 66 |
'sort_descending' => __( 'Sort Descending', 'filebird' ), |
| 67 |
'reset' => __( 'Reset', 'filebird' ), |
| 68 |
'by_name' => __( 'By Name', 'filebird' ), |
| 69 |
'name_ascending' => __( 'Name Ascending', 'filebird' ), |
| 70 |
'name_descending' => __( 'Name Descending', 'filebird' ), |
| 71 |
'by_date' => __( 'By Date', 'filebird' ), |
| 72 |
'date_ascending' => __( 'Date Ascending', 'filebird' ), |
| 73 |
'date_descending' => __( 'Date Descending', 'filebird' ), |
| 74 |
'by_modified' => __( 'By Modified', 'filebird' ), |
| 75 |
'modified_ascending' => __( 'Modified Ascending', 'filebird' ), |
| 76 |
'modified_descending' => __( 'Modified Descending', 'filebird' ), |
| 77 |
'by_author' => __( 'By Author', 'filebird' ), |
| 78 |
'by_file_name' => __( 'By File Name', 'filebird' ), |
| 79 |
'author_ascending' => __( 'Author Ascending', 'filebird' ), |
| 80 |
'author_descending' => __( 'Author Descending', 'filebird' ), |
| 81 |
'by_title' => __( 'By Title', 'filebird' ), |
| 82 |
'title_ascending' => __( 'Title Ascending', 'filebird' ), |
| 83 |
'title_descending' => __( 'Title Descending', 'filebird' ), |
| 84 |
'by_size' => __( 'By Size', 'filebird' ), |
| 85 |
'size_ascending' => __( 'Size Ascending', 'filebird' ), |
| 86 |
'size_descending' => __( 'Size Descending', 'filebird' ), |
| 87 |
'skip_and_deactivate' => __( 'Skip & Deactivate', 'filebird' ), |
| 88 |
'deactivate' => __( 'Deactivate', 'filebird' ), |
| 89 |
'thank_you_so_much' => __( 'Thank you so much!', 'filebird' ), |
| 90 |
'feedback' => array( |
| 91 |
'no_features' => __( 'It doesn\'t have the features I\'m looking for.', 'filebird' ), |
| 92 |
'not_working' => __( 'Not work with my theme or other plugins.', 'filebird' ), |
| 93 |
'found_better_plugin' => __( 'Found another plugin that works better.', 'filebird' ), |
| 94 |
'not_know_using' => __( 'Don\'t know how to use it.', 'filebird' ), |
| 95 |
'temporary_deactivation' => __( 'This is just temporary, I will use it again.', 'filebird' ), |
| 96 |
'other' => __( 'Other', 'filebird' ), |
| 97 |
), |
| 98 |
'which_features' => __( 'Which features please?', 'filebird' ), |
| 99 |
'found_better_plugin_placeholder' => __( 'Please tell us which one', 'filebird' ), |
| 100 |
'not_know_using_document' => __( 'Please read FileBird documentation <a target="_blank" href="https://ninjateam.gitbook.io/filebird/">here</a> or <a target="_blank" href="https://ninjateam.org/support/">chat with us</a> if you need help', 'filebird' ), |
| 101 |
'not_working_support' => __( 'Please <a target="_blank" href="https://ninjateam.org/support/">ask for support here</a>, we will fix it for you.', 'filebird' ), |
| 102 |
'other_placeholder' => __( 'Please share your thoughts...', 'filebird' ), |
| 103 |
'quick_feedback' => __( 'Want a better FileBird?', 'filebird' ), |
| 104 |
'deactivate_sadly' => __( 'Sorry to see you walk away, please share why you want to deactivate FileBird?', 'filebird' ), |
| 105 |
'folder_limit_reached' => __( 'Folder Limit Reached', 'filebird' ), |
| 106 |
'limit_folder' => __( |
| 107 |
'<p>FileBird Lite version supports up to 10 folders.<br>Please upgrade to have unlimited folders and other premium features!</p> |
| 108 |
<ul class="fbv-in_feature"> |
| 109 |
<li>Unlimited Folders</li> |
| 110 |
<li>Sort Files / Folders</li> |
| 111 |
<li>Compatible with Premium Page Builders <span id="fbv-pagebuilder" class="njn-i"><svg viewBox="0 0 192 512"><path fill="currentColor" d="M20 424.229h20V279.771H20c-11.046 0-20-8.954-20-20V212c0-11.046 8.954-20 20-20h112c11.046 0 20 8.954 20 20v212.229h20c11.046 0 20 8.954 20 20V492c0 11.046-8.954 20-20 20H20c-11.046 0-20-8.954-20-20v-47.771c0-11.046 8.954-20 20-20zM96 0C56.235 0 24 32.235 24 72s32.235 72 72 72 72-32.235 72-72S135.764 0 96 0z"></path></svg></span></li> |
| 112 |
<li>Get Fast Updates</li> |
| 113 |
<li>Premium Technical Support</li> |
| 114 |
<li>One-time Payment</li> |
| 115 |
<li>30-day Refund Guarantee</li> |
| 116 |
</ul>', |
| 117 |
'filebird' |
| 118 |
), |
| 119 |
'pagebuilder_support' => __( 'Including Divi, Fusion, Thrive Architect, WPBakery...', 'filebird' ), |
| 120 |
'upgrade_to_pro' => __( 'Upgrade to FileBird Pro', 'filebird' ), |
| 121 |
'success' => __( 'Success.', 'filebird' ), |
| 122 |
'filebird_db_updated' => __( 'Congratulations. Successfully imported!', 'filebird' ), |
| 123 |
'go_to_media' => __( 'Go To Media', 'filebird' ), |
| 124 |
'update_noti_title' => __( 'FileBird 4 Update Required', 'filebird' ), |
| 125 |
'update_noti_desc' => __( 'You\'re using the new FileBird 4. Please import database to view your folders correctly.', 'filebird' ), |
| 126 |
'update_noti_btn' => __( 'Import now', 'filebird' ), |
| 127 |
'update' => __( 'Update', 'filebird' ), |
| 128 |
'import_failed' => __( 'Import failed. Please try again or <a href="https://ninjateam.org/support" target="_blank">contact our support</a>.', 'filebird' ), |
| 129 |
'purchase_code_missing' => __( 'Please enter your Purchase Code.', 'filebird' ), |
| 130 |
'envato_token_missing' => __( 'Please enter your Personal Access Token or get one.', 'filebird' ), |
| 131 |
'envato_invalid_license' => __( 'Can not active your License, please try again.', 'filebird' ), |
| 132 |
'settings' => __( 'Settings', 'filebird' ), |
| 133 |
'fb_settings' => __( 'FileBird Settings', 'filebird' ), |
| 134 |
'select_default_startup_folder' => __( 'Select a default startup folder:', 'filebird' ), |
| 135 |
'auto_sort_files_by' => __( 'Auto sort files by:', 'filebird' ), |
| 136 |
'default' => __( 'Default', 'filebird' ), |
| 137 |
'set_setting_success' => __( 'Settings saved', 'filebird' ), |
| 138 |
'set_setting_fail' => __( 'Failed to save settings. Please try again!', 'filebird' ), |
| 139 |
'unlock_new_features_title' => __( 'Unlock new features', 'filebird' ), |
| 140 |
'unlock_new_features_desc' => __( 'To use FileBird folders with your current page builder/plugin, please upgrade to PRO version.', 'filebird' ), |
| 141 |
'do_more_with_filebird_title' => __( 'Do more with FileBird PRO', 'filebird' ), |
| 142 |
'do_more_with_filebird_desc' => __( 'You\'re using a third party plugin, which is supported in FileBird PRO. Please upgrade to browse files faster and get more done.', 'filebird' ), |
| 143 |
'go_pro' => __( 'Go Pro', 'filebird' ), |
| 144 |
'view_details' => __( 'View details.', 'filebird' ), |
| 145 |
'turn_off_for_7_days' => __( 'Turn off for 7 days', 'filebird' ), |
| 146 |
'collapse' => __( 'Collapse', 'filebird' ), |
| 147 |
'expand' => __( 'Expand', 'filebird' ), |
| 148 |
'uploaded' => __( 'Uploaded', 'filebird' ), |
| 149 |
'lessThanAMin' => __( 'Less than a min', 'filebird' ), |
| 150 |
'totalSize' => __( 'Total size', 'filebird' ), |
| 151 |
'move' => __( 'Move', 'filebird' ), |
| 152 |
'item' => __( 'item', 'filebird' ), |
| 153 |
'items' => __( 'items', 'filebird' ), |
| 154 |
'import_folder_to_filebird' => __( 'Import folders to FileBird', 'filebird' ), |
| 155 |
'go_to_import' => __( 'Go to import', 'filebird' ), |
| 156 |
'no_thanks' => __( 'No, thanks', 'filebird' ), |
| 157 |
'import_some_folders' => __( 'You have some folders created by other media plugins. Would you like to import them?', 'filebird' ), |
| 158 |
'default_tree_view' => __( 'Default Tree View', 'filebird' ), |
| 159 |
'flat_tree_view' => __( 'Flat Tree View', 'filebird' ), |
| 160 |
'processing' => __( 'Processing...', 'filebird' ), |
| 161 |
'generating' => __( 'Generating...', 'filebird' ), |
| 162 |
'generated' => __( 'Generated!', 'filebird' ), |
| 163 |
'imported' => __( 'Imported!', 'filebird' ), |
| 164 |
'please_try_again' => __( 'Please try again.', 'filebird' ), |
| 165 |
'successfully_exported' => __( 'Successfully exported!', 'filebird' ), |
| 166 |
'successfully_imported' => __( 'Successfully imported!', 'filebird' ), |
| 167 |
'active_to_use_feature' => __( 'Please activate FileBird license to use this feature.', 'filebird' ), |
| 168 |
'all_folders' => __( 'All folders', 'filebird' ), |
| 169 |
'common_folders' => __( 'Common folders', 'filebird' ), |
| 170 |
'all_folders_description' => __( 'This option imports the common folder tree and user-based folder trees.', 'filebird' ), |
| 171 |
'common_folders_description' => __( 'This option imports only the common folder tree.', 'filebird' ), |
| 172 |
'user_folders_description' => __( 'This option imports the folder tree created by', 'filebird' ), |
| 173 |
'add_your_first_folder' => __( 'Add your first folder', 'filebird' ), |
| 174 |
'add_your_first_folder_description' => __( 'You don\'t have any folder. Add folder to easily manage your', 'filebird' ), |
| 175 |
'add_folder' => __( 'Add Folder', 'filebird' ), |
| 176 |
'all_pages' => __( 'All Pages', 'filebird' ), |
| 177 |
'all_posts' => __( 'All Posts', 'filebird' ), |
| 178 |
'all_items' => __( 'All Items', 'filebird' ), |
| 179 |
'files' => __( 'files', 'filebird' ), |
| 180 |
'posts' => __( 'posts', 'filebird' ), |
| 181 |
'pages' => __( 'pages', 'filebird' ), |
| 182 |
'ascending' => __( 'Ascending', 'filebird' ), |
| 183 |
'descending' => __( 'Descending', 'filebird' ), |
| 184 |
'reset_folders_arrangement' => __( 'Reset folders arrangement', 'filebird' ), |
| 185 |
'reset_files_arrangement' => __( 'Reset files arrangement', 'filebird' ), |
| 186 |
'login_with_envato' => __( 'Login with Envato', 'filebird' ), |
| 187 |
'update_old_folder_desc' => __( |
| 188 |
'By running this action, all folders created in version 3.9 & earlier installs will |
| 189 |
be imported.', |
| 190 |
'filebird' |
| 191 |
), |
| 192 |
'import_from_old_version' => __( 'Import from old version', 'filebird' ), |
| 193 |
'rest_api_key' => __( 'REST API key', 'filebird' ), |
| 194 |
'generate' => __( 'Generate', 'filebird' ), |
| 195 |
'attachment_size' => __( 'Attachment Size', 'filebird' ), |
| 196 |
'generate_api_desc' => __( |
| 197 |
'Please see FileBird API for developers |
| 198 |
<a |
| 199 |
target="_blank" |
| 200 |
href="https://ninjateam.gitbook.io/filebird/integrations/developer-zone/apis" |
| 201 |
rel="noreferrer" |
| 202 |
>here</a>.', |
| 203 |
'filebird' |
| 204 |
), |
| 205 |
'generate_attachment_size_desc' => __( 'Generate attachment size used in "Sort by size" function.', 'filebird' ), |
| 206 |
'clear_all_data' => __( 'Clear All Data', 'filebird' ), |
| 207 |
'clear' => __( 'Clear', 'filebird' ), |
| 208 |
'clear_all_data_desc' => __( |
| 209 |
'This action will delete all FileBird data, FileBird settings and bring you back to |
| 210 |
WordPress default media library.', |
| 211 |
'filebird' |
| 212 |
), |
| 213 |
'import_folders_desc' => __( |
| 214 |
"Import categories/folders from other plugins. We import virtual folders, your website will |
| 215 |
be safe, don't worry ;)", |
| 216 |
'filebird' |
| 217 |
), |
| 218 |
'contact_support' => __( 'Contact Support', 'filebird' ), |
| 219 |
'import' => __( 'Import', 'filebird' ), |
| 220 |
'export_csv' => __( 'Export CSV', 'filebird' ), |
| 221 |
'export_csv_now' => __( 'Export Now', 'filebird' ), |
| 222 |
'export_csv_desc' => __( 'The current folder structure will be exported.', 'filebird' ), |
| 223 |
'import_csv' => __( 'Import CSV', 'filebird' ), |
| 224 |
'import_csv_desc' => __( |
| 225 |
'Choose FileBird CSV file to import. |
| 226 |
<br /> |
| 227 |
(Please check to make sure that there is no duplicated name. The current folder |
| 228 |
structure is preserved.) |
| 229 |
<a |
| 230 |
href="https://ninjateam.gitbook.io/filebird/settings/import-and-export-folder-structure" |
| 231 |
target="_blank" |
| 232 |
rel="noopener noreferrer" |
| 233 |
> |
| 234 |
Learn more |
| 235 |
</a> |
| 236 |
<br />', |
| 237 |
'filebird' |
| 238 |
), |
| 239 |
'download_file' => __( 'Download File', 'filebird' ), |
| 240 |
'choose_user_folder' => __( 'Choose user folder:', 'filebird' ), |
| 241 |
'which_post_types_do_you_want' => __( 'Which post types do you want to use with FileBird?', 'filebird' ), |
| 242 |
'by' => __( 'by', 'filebird' ), |
| 243 |
'display_folder_id' => __( 'Display folder ID', 'filebird' ), |
| 244 |
'hide_folder_id' => __( 'Hide folder ID', 'filebird' ), |
| 245 |
'active_your_license' => __( 'Activate Your License!', 'filebird' ), |
| 246 |
'explore_filebird' => __( 'Explore the best of FileBird', 'filebird' ), |
| 247 |
'feature_1' => __( 'Download entire folders in ZIP', 'filebird' ), |
| 248 |
'feature_2' => __( 'Advanced third-party compatibility', 'filebird' ), |
| 249 |
'feature_3' => __( 'Sort files and folders', 'filebird' ), |
| 250 |
'feature_4' => __( 'Folder themes (Windows 11 and Dropbox)', 'filebird' ), |
| 251 |
'feature_5' => __( 'File count, breadcrumb, folder custom colors, and more', 'filebird' ), |
| 252 |
'feature_6' => __( 'One-time payment', 'filebird' ), |
| 253 |
'feature_7' => __( 'VIP live chat support', 'filebird' ), |
| 254 |
'congratulations' => __( 'Congratulations!', 'filebird' ), |
| 255 |
'activated_license' => __( 'Your FileBird Pro was activated!', 'filebird' ), |
| 256 |
'buy_another_license' => __( 'Buy another license.', 'filebird' ), |
| 257 |
'your_license_is' => __( 'Your license is:', 'filebird' ), |
| 258 |
'license_note' => __( 'If you are on a development site and you want to activate this license later on the production domain, please deactivate it from here first.', 'filebird' ), |
| 259 |
'learn_more' => __( 'Learn more', 'filebird' ), |
| 260 |
'deactivated_license' => __( 'Deactivate license.', 'filebird' ), |
| 261 |
'note' => __( 'Note', 'filebird' ), |
| 262 |
'starting_new_site' => __( 'Starting a new site?', 'filebird' ), |
| 263 |
'confirm' => __( 'Confirm', 'filebird' ), |
| 264 |
'sync_wpml' => __( 'Sync WPML', 'filebird' ), |
| 265 |
'sync' => __( 'Sync', 'filebird' ), |
| 266 |
'sync_wpml_desc' => __( 'Assign WPML existing translated media to FileBird folders.', 'filebird' ), |
| 267 |
'count' => __( 'Count', 'filebird' ), |
| 268 |
'count_in_folder' => __( 'Count files in each folder', 'filebird' ), |
| 269 |
'count_nested' => __( 'Count files in both parent folder and subfolders', 'filebird' ), |
| 270 |
'general' => __( 'General', 'filebird' ), |
| 271 |
'each_user_has_own_folder' => __( 'Each user has his own folders', 'filebird' ), |
| 272 |
'show_breadcrumb' => __( 'Show breadcrumb', 'filebird' ), |
| 273 |
'folder_counter' => __( 'Folder counter', 'filebird' ), |
| 274 |
'theme' => __( 'Theme', 'filebird' ), |
| 275 |
'theme_alert' => sprintf( __( 'The theme switcher is for previewing purposes only. Please activate your <a href="%s" target="_blank" rel="noopener noreferrer">FileBird license</a> to apply it accordingly.', 'filebird' ), 'https://ninjateam.gitbook.io/filebird/features/interface/folder-tree-themes' ), |
| 276 |
'max_input_length' => __( 'Please ensure your folder name is fewer than 200 characters.', 'filebird' ), |
| 277 |
'svg_upload_desc' => __( 'Allow built-in SVG upload & sanitization', 'filebird' ), |
| 278 |
'open_filebird' => __( 'Open FileBird', 'filebird' ), |
| 279 |
'activation' => __( 'Activation', 'filebird' ), |
| 280 |
'tools' => __( 'Tools', 'filebird' ), |
| 281 |
'import_export' => __( 'Import/Export', 'filebird' ), |
| 282 |
'select_theme' => __( 'Select theme', 'filebird' ), |
| 283 |
'by' => __( 'By', 'filebird' ), |
| 284 |
'lifetime_license' => __( 'Lifetime license', 'filebird' ), |
| 285 |
'pro' => __( 'PRO', 'filebird' ), |
| 286 |
'no_folders_export' => __( 'There are no folders to export.', 'filebird' ), |
| 287 |
'searching_folder_api' => __( 'Switch from searching using JavaScript to using an API', 'filebird' ), |
| 288 |
'folders_for_media_library' => __( 'Folders for media library', 'filebird' ), |
| 289 |
'folders_for_post_types' => __( 'Folders for post types', 'filebird' ), |
| 290 |
); |
| 291 |
return $translation; |
| 292 |
} |
| 293 |
} |