From 731edcb2e50dbf10e4f5c8059e892d7bfbdacfbf Mon Sep 17 00:00:00 2001 From: Erik-Jan Westendorp Date: Fri, 19 Jul 2024 11:13:10 +0200 Subject: [PATCH 1/4] Change file extension from xml to js --- 14/umbraco-forms/developer/localization.md | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/14/umbraco-forms/developer/localization.md b/14/umbraco-forms/developer/localization.md index f18b95366df..460186baf5d 100644 --- a/14/umbraco-forms/developer/localization.md +++ b/14/umbraco-forms/developer/localization.md @@ -12,16 +12,16 @@ When an editor chooses a language for their account, Umbraco CMS will render app Umbraco Forms ships with translations for the following languages: - - Czech (`cs-cz.xml`) - - Danish (`da-dk.xml`) - - Spanish (`es-es.xml`) - - French (`fr-fr.xml`) - - Italian (`it-it.xml`) - - Polish (`pl-pl.xml`) - - UK English (`en-gb.xml`) - - US English (`en-us.xml`) - -If the language you require does not exist, it's possible to create your own by duplicating the default `en-us.xml` file. You can then save it with the appropriate culture code for the language you need and replace the English text with the translated version. + - Czech (`cs-cz.js`) + - Danish (`da-dk.js`) + - Spanish (`es-es.js`) + - French (`fr-fr.js`) + - Italian (`it-it.js`) + - Polish (`pl-pl.js`) + - UK English (`en-gb.js`) + - US English (`en-us.js`) + +If the language you require does not exist, it's possible to create your own by duplicating the default `en-us.js` file. You can then save it with the appropriate culture code for the language you need and replace the English text with the translated version. As of Forms 10, the file no longer exists on disk and is shipped as part of the `Umbraco.Forms.StaticAssets` NuGet package. You can open this package, either locally using [Nuget Package Explorer](https://apps.microsoft.com/store/detail/nuget-package-explorer/9WZDNCRDMDM3?hl=en-gb&gl=gb&rtc=1), or [online](https://www.nuget.org/packages/Umbraco.Forms.StaticAssets/) by clicking the "Open in NuGet Package Explorer" link. You'll find the file at `staticwebassets/Lang/en-us.xml`. From e6b4b369fdd6088b3da100a92e7a8a5ee7bd2d60 Mon Sep 17 00:00:00 2001 From: Erik-Jan Westendorp Date: Fri, 19 Jul 2024 11:13:46 +0200 Subject: [PATCH 2/4] Change path --- 14/umbraco-forms/developer/localization.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/14/umbraco-forms/developer/localization.md b/14/umbraco-forms/developer/localization.md index 460186baf5d..9af61dd9e5d 100644 --- a/14/umbraco-forms/developer/localization.md +++ b/14/umbraco-forms/developer/localization.md @@ -23,6 +23,6 @@ Umbraco Forms ships with translations for the following languages: If the language you require does not exist, it's possible to create your own by duplicating the default `en-us.js` file. You can then save it with the appropriate culture code for the language you need and replace the English text with the translated version. -As of Forms 10, the file no longer exists on disk and is shipped as part of the `Umbraco.Forms.StaticAssets` NuGet package. You can open this package, either locally using [Nuget Package Explorer](https://apps.microsoft.com/store/detail/nuget-package-explorer/9WZDNCRDMDM3?hl=en-gb&gl=gb&rtc=1), or [online](https://www.nuget.org/packages/Umbraco.Forms.StaticAssets/) by clicking the "Open in NuGet Package Explorer" link. You'll find the file at `staticwebassets/Lang/en-us.xml`. +As of Forms 10, the file no longer exists on disk and is shipped as part of the `Umbraco.Forms.StaticAssets` NuGet package. You can open this package, either locally using [Nuget Package Explorer](https://apps.microsoft.com/store/detail/nuget-package-explorer/9WZDNCRDMDM3?hl=en-gb&gl=gb&rtc=1), or [online](https://www.nuget.org/packages/Umbraco.Forms.StaticAssets/) by clicking the "Open in NuGet Package Explorer" link. You'll find the file at `staticwebassets/en-us.js`. Once translated, the new file should be saved into the `App_Plugins/UmbracoForms/app/lang/` folder. From dc767f347192a768da7470d96af0cf21a2ef9df1 Mon Sep 17 00:00:00 2001 From: Erik-Jan Westendorp Date: Fri, 19 Jul 2024 11:27:48 +0200 Subject: [PATCH 3/4] Explain how to register localization files --- 14/umbraco-forms/developer/localization.md | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/14/umbraco-forms/developer/localization.md b/14/umbraco-forms/developer/localization.md index 9af61dd9e5d..a3cfe6899fa 100644 --- a/14/umbraco-forms/developer/localization.md +++ b/14/umbraco-forms/developer/localization.md @@ -25,4 +25,22 @@ If the language you require does not exist, it's possible to create your own by As of Forms 10, the file no longer exists on disk and is shipped as part of the `Umbraco.Forms.StaticAssets` NuGet package. You can open this package, either locally using [Nuget Package Explorer](https://apps.microsoft.com/store/detail/nuget-package-explorer/9WZDNCRDMDM3?hl=en-gb&gl=gb&rtc=1), or [online](https://www.nuget.org/packages/Umbraco.Forms.StaticAssets/) by clicking the "Open in NuGet Package Explorer" link. You'll find the file at `staticwebassets/en-us.js`. -Once translated, the new file should be saved into the `App_Plugins/UmbracoForms/app/lang/` folder. +Once translated, the new file should be saved somewhere in the `App_Plugins` folder for example `App_Plugins/UmbracoFormsExtensions/`. The final step is to register the localization file. The can be done by creating a `umbraco-package.json` like so: + +```json +{ + "$schema": "../../umbraco-package-schema.json", + "name": "Umbraco.Forms.Extensions", + "extensions": [ + { + "type": "localization", + "alias": "UmbracoForms.Localize.NlNL", + "name": "Dutch (Netherlands)", + "meta": { + "culture": "nl-nl" + }, + "js": "/App_Plugins/UmbracoFormsLocalization/nl-nl.js" + } + ] +} +``` From b5c50f67b84dd5dce8b183d412f8b2f4301b61bd Mon Sep 17 00:00:00 2001 From: Erik-Jan Westendorp Date: Fri, 19 Jul 2024 11:54:01 +0200 Subject: [PATCH 4/4] Fix folder --- 14/umbraco-forms/developer/localization.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/14/umbraco-forms/developer/localization.md b/14/umbraco-forms/developer/localization.md index a3cfe6899fa..cb127428b88 100644 --- a/14/umbraco-forms/developer/localization.md +++ b/14/umbraco-forms/developer/localization.md @@ -25,7 +25,7 @@ If the language you require does not exist, it's possible to create your own by As of Forms 10, the file no longer exists on disk and is shipped as part of the `Umbraco.Forms.StaticAssets` NuGet package. You can open this package, either locally using [Nuget Package Explorer](https://apps.microsoft.com/store/detail/nuget-package-explorer/9WZDNCRDMDM3?hl=en-gb&gl=gb&rtc=1), or [online](https://www.nuget.org/packages/Umbraco.Forms.StaticAssets/) by clicking the "Open in NuGet Package Explorer" link. You'll find the file at `staticwebassets/en-us.js`. -Once translated, the new file should be saved somewhere in the `App_Plugins` folder for example `App_Plugins/UmbracoFormsExtensions/`. The final step is to register the localization file. The can be done by creating a `umbraco-package.json` like so: +Once translated, the new file should be saved somewhere in the `App_Plugins` folder for example `App_Plugins/UmbracoFormsLocalization/`. The final step is to register the localization file. The can be done by creating a `umbraco-package.json` like so: ```json {