Zum Hauptinhalt springen
Echtzeit-Radar & Feeds
Alle RSS Feeds ➔
👥 Community & Social
Sichere Programmierung[$] LWN.net Weekly Edition for October 1, 2026(01.10.2026 um 02:30 Uhr)
•
KI & AI VideosJulian Goldie SEO: Gemini 4 Argon just dropped!(01.10.2026 um 02:45 Uhr)
•
KI & AI VideosJulian Goldie SEO: Gemini 4 Argon!(01.10.2026 um 02:48 Uhr)
•
IT NachrichtenHere’s the Samsung Galaxy Buds On and Their Features(01.10.2026 um 02:41 Uhr)
••••
Hacking & PentestingAlbert Hacker - Nachrichten & Infos - Basketball - Eurosport(30.09.2026 um 14:22 Uhr)
•
AI & KI NachrichtenElon Musk’s Grokipedia has a ‘newly refreshed’ design(01.10.2026 um 02:23 Uhr)
••
Sichere Programmierung[$] LWN.net Weekly Edition for October 1, 2026(01.10.2026 um 02:30 Uhr)
•
KI & AI VideosJulian Goldie SEO: Gemini 4 Argon just dropped!(01.10.2026 um 02:45 Uhr)
•
KI & AI VideosJulian Goldie SEO: Gemini 4 Argon!(01.10.2026 um 02:48 Uhr)
•
IT NachrichtenHere’s the Samsung Galaxy Buds On and Their Features(01.10.2026 um 02:41 Uhr)
••••
Hacking & PentestingAlbert Hacker - Nachrichten & Infos - Basketball - Eurosport(30.09.2026 um 14:22 Uhr)
•
AI & KI NachrichtenElon Musk’s Grokipedia has a ‘newly refreshed’ design(01.10.2026 um 02:23 Uhr)
••
Intelligence View
⚡ tsecurity.de Intelligence

Batch Processing of Translation Resource for Angular Apps

Introduction You have been developing SPA using Angular 2+, and familiar with i18n with Angular. Typically, the production build outputs such multiple…

Beitrag
0
Seite
0
↗ Quelle (dev.to)
Social ReaktionenReagiere als Erste:r — dein Feedback zählt!




Introduction



You have been developing SPA using Angular 2+, and familiar with i18n with Angular.



Typically, the production build outputs such multiple deployment images for each locale:



Production Build for locales



And the build retrieves the translated XLIFF files:



Translation Resources



Different software shops may have different collaboration workflows of handling localization/translation. If you are a full-stack developer working in a small shop, likely you will the one who proceeds the machine translation, before involving human translators.



There are wide variety of tools available to automate the machine translation as much as possible, most of them are with interactive GUI. If you prefer CLI and batch processing for the sake of Continuous Integration, you may be interested in using GoogleTranslateXliff introduced in this article.






Continuous Integration with Machine Translation






Write Codes and Test with Development Build



Most of the time during coding, you would be using the development build in a default language.






Update Translation Resource Files



Once you (your team) feel confident of making a release, you update, add or merge the translation resource files through this command:



ng extract-i18n



By default, all the new translation units are with state "new" (XLIFF 1.2) or "initial" (XLIFF 2.0).



As of Angular 19, it is better to update this command with ng-extract-i18n-merge which can merge the updates well.



The .angular.json file should have the following:




        "extract-i18n": {
"builder": "ng-extract-i18n-merge:ng-extract-i18n-merge",
"options": {
"buildTarget": "myng:build",
"format": "xlf",
"outputPath": "src/locales",
"targetFiles": [
"messages.zh-hans.xlf",
"messages.zh-hant.xlf",
"messages.ja.xlf",
"messages.th.xlf",
"messages.es.xlf",
"messages.pt.xlf",
"messages.fr.xlf",
"messages.hi.xlf"
],






References:








Translate Using Google Translate API v2 or v3



Prerequisites:




  • You have Google Cloud API account, and have acquired API Key for Google Translate v2 or client secret for v3.

  • You have GoogleTranslateStrings.exe installed in your dev PC. The build scripts for Windows, MacOS and Linux are located in the app code folder for any of the stable releases, presumably you know how to build DotNet programs on Linux or MacOS.



Run this to translate the Spanish resource file:




GoogleTranslateXliff.exe /AK=YourGoogleTranslateV2ApiKey /F=messages.es.xlf






By default, the CLI app will translate those units with state "new" or "initial" only, and then mark the state as "translated".



For multiple locales, it is reasonable to have a shell script to automate further, and this PowerShell script could be a starting point:




$commandPath='C:/Green/GoogleTranslateXliff/GoogleTranslateXliff.exe'
$apiKey='MyGoogleTranslateV2ApiKey'

foreach ($lang in 'es', 'fr', 'hi', 'ja', 'pt', 'th', 'zh-hans', 'zh-hant'){
$cmd='$commandPath /AK=$apiKey /B /F=messages.$lang.xlf'
Invoke-Expression $ExecutionContext.InvokeCommand.ExpandString($cmd)
}






Optionally you may involve some human translators to review and finalize the translations and mark those units "signed-off" or "final".



Hints:








Production Build of Angular App



Typically you may run something like:




ng build --configuration=production









Next Release Cycle



For the sake of Agile Software Development, likely you will produce frequent releases, daily, weekly, fortnightly or monthly. Hopefully this CLI tool along with some PowerShell scripts may reduce the operation overhead and make the CI smoother.

2. Cyber Threat Intelligence & Forensik

CTI Threat Relationship Graph6 Knoten / 5 Relationen
CVE / Incident Software MITRE ATT&CK CWE Weakness IoC
MITRE ATT&CK Matrix Navigator 14 Taktiken
1 belegte TechnikenLive-Mapping
Reconnaissance
Resource Development
Initial Access
Execution
Persistence
Privilege Escalation
Defense Evasion
Credential Access
Discovery
Lateral Movement
Collection
Command and Control
Exfiltration
Impact
Ähnliche Beiträge
🔍 Verwandte News

Auch interessante Nachrichten Batch Processing of Translation Resource for Angular Apps

Thematisch verwandte Begriffe: Batch, Processing, Translation, Resource · 6 Treffer

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

💬 Kommentare werden geladen…
Zum Aktualisieren ziehen
tsecurity.de Icon
Offline-Lesen, Eilmeldungen & 0ms Ladezeit

Installiere tsecurity.de direkt auf deinen Home-Bildschirm für das ultimative Vollbild-Magazinerlebnis ohne Browser-Leisten.

Nächster Beitrag