![]() This is, however, hardly a recommended way for serious projects, as it will definitely pose maintenance issues down the road. Arrays will be populated with translated strings, which can then be looked up from within templates: The easiest way to internationalize PHP software is by using array files. We will go through the various implementation options and the different tools that are available at our disposal to ease the process. In this article, we will learn how to internationalize and localize software written in PHP. Also, whenever a part of the interface (containing text) is updated, new content becomes available - which then needs to be localized (i.e., translated) to all supported locales. Localization needs to be performed every time a new language or region needs to be supported. Once your codebase has been internationalized, localization (l10n) becomes a matter of translating the contents of your application to a specific language/locale. Internationalization is usually done once, preferably in the beginning of the project to avoid needing huge changes in the source code down the road. Internationalization (i18n) of your codebase, helps ensure that it can be adapted to different languages or regions with relative ease. The way your code is organized, and how your components and interface are designed, plays an important role in determining how easily you can localize your application. You may even find languages with a total of four, five, or six plural forms, such as in Slovenian, Irish, or Arabic. In other languages, though – such as Slavic languages – there are two plural forms in addition to the singular one. Rules of pluralization in English are pretty straightforward: you can have a singular form of a word or a plural form of a word. The differences in grammar rules, language nuances, date formats, and more combine to make localization a unique and formidable challenge. The editor.taskConfig is to control the background task manager, which executes the transunit saving commands.Whether you are building a website or a full-fledged web application, making it accessible to a wider audience often requires it to be available in different languages and locales.įundamental differences between most human languages make this anything but easy. When editor is in default mode, this option is set delete as default When editor is in target-file mode, this option is set fallback-to-source as default Task Config Setting ![]() fallback-to-source: fill the translation target using the source string and mark as need-translation.keep: keep the trans unit in the target xliff and mark as need-translation.delete: delete the trans unit in the target xliff when empty.Use the xliff specify in the messageLocations as source and auto generate the target translation xliff based on the given translationFileNamePattern Įdit directly on the target xliff (based on the messageLocations and the given translationFileNamePattern)Įditor.emptyTranslationHandling: 'delete' | 'keep' | 'fallback-to-source'ĭetermine how to handle empty translation. is the consist parts of LCID editor.mode: 'default' | 'target-file' The locales setting accepts one ore more target locales that your application is going to be translated into. The editor.taskConfig is to control the background task manager, which executes the transunit saving commands. The editor setting is to control the behavior of I18n editor as well as the background task manager. The following is the configuration options: Path ![]() Extension SettingsĮxtension setting is a json file that placed in the root directory of the workspace, using the name. This extension will only be activated when the extension setting file is under your workspace root directory. This feature is on the roadmap but not yet started. Translation memory is to store your tranlation history and will give you suggestion for your transunits. This will help you write better translations. The code context shows the location where the translation will be apply to. Translations that mark as signed-off could not be edit in the editor, unless you unlock them. Save and Lock Your TranslationĪfter you translated one trans unit, you can click ctrl + enter to save and lock ( signed-off) your translation. This extension provides a friendly to use editor for users to translate their apps. If you're struggling handle the xliff files that generated by AngularCLI, this extension might be helpful for you. This extension provides an editor for Angular generated xliff file. Anglar I18n Editor for VSCode ( vscode-ng-i18n-editor) ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |