9 | Swapping to Development environment will display more detailed information about the error that occurred.
10 |
11 |
12 | The Development environment shouldn't be enabled for deployed applications.
13 | It can result in displaying sensitive information from exceptions to end users.
14 | For local debugging, enable the Development environment by setting the ASPNETCORE_ENVIRONMENT environment variable to Development
15 | and restarting the app.
16 |
9 | Swapping to Development environment will display more detailed information about the error that occurred.
10 |
11 |
12 | The Development environment shouldn't be enabled for deployed applications.
13 | It can result in displaying sensitive information from exceptions to end users.
14 | For local debugging, enable the Development environment by setting the ASPNETCORE_ENVIRONMENT environment variable to Development
15 | and restarting the app.
16 |
2 |
3 | @Title
4 |
5 |
6 | Please take our
7 | brief survey
8 |
9 | and tell us what you think.
10 |
11 |
12 | @code {
13 | // Demonstrates how a parent component can supply parameters
14 | [Parameter]
15 | public string Title { get; set; }
16 | }
17 |
--------------------------------------------------------------------------------
/.NET5 Blazor Server App/Localization-with-static-culture/Shared/SyncfusionLocalizer.cs:
--------------------------------------------------------------------------------
1 | using Syncfusion.Blazor;
2 |
3 | namespace LocalizationServerApp.Shared
4 | {
5 | public class SyncfusionLocalizer : ISyncfusionStringLocalizer
6 | {
7 | // To get the locale key from mapped resources file
8 | public string GetText(string key)
9 | {
10 | return this.ResourceManager.GetString(key);
11 | }
12 |
13 | // To access the resource file and get the exact value for locale key
14 | public System.Resources.ResourceManager ResourceManager
15 | {
16 | get
17 | {
18 | // Replace the ApplicationNamespace with your application name.
19 | return LocalizationServerApp.Resources.SfResources.ResourceManager;
20 | }
21 | }
22 | }
23 | }
--------------------------------------------------------------------------------
/.NET5 Blazor Server App/Localization-with-static-culture/_Imports.razor:
--------------------------------------------------------------------------------
1 | @using System.Net.Http
2 | @using Microsoft.AspNetCore.Authorization
3 | @using Microsoft.AspNetCore.Components.Authorization
4 | @using Microsoft.AspNetCore.Components.Forms
5 | @using Microsoft.AspNetCore.Components.Routing
6 | @using Microsoft.AspNetCore.Components.Web
7 | @using Microsoft.JSInterop
8 | @using LocalizationServerApp
9 | @using LocalizationServerApp.Shared
10 | @using Syncfusion.Blazor
11 | @using Syncfusion.Blazor.Grids
--------------------------------------------------------------------------------
/.NET5 Blazor Server App/Localization-with-static-culture/appsettings.Development.json:
--------------------------------------------------------------------------------
1 | {
2 | "DetailedErrors": true,
3 | "Logging": {
4 | "LogLevel": {
5 | "Default": "Information",
6 | "Microsoft": "Warning",
7 | "Microsoft.Hosting.Lifetime": "Information"
8 | }
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/.NET5 Blazor Server App/Localization-with-static-culture/appsettings.json:
--------------------------------------------------------------------------------
1 | {
2 | "Logging": {
3 | "LogLevel": {
4 | "Default": "Information",
5 | "Microsoft": "Warning",
6 | "Microsoft.Hosting.Lifetime": "Information"
7 | }
8 | },
9 | "AllowedHosts": "*"
10 | }
11 |
--------------------------------------------------------------------------------
/.NET5 Blazor Server App/Localization-with-static-culture/wwwroot/css/open-iconic/ICON-LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2014 Waybury
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in
13 | all copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | THE SOFTWARE.
--------------------------------------------------------------------------------
/.NET5 Blazor Server App/Localization-with-static-culture/wwwroot/css/open-iconic/font/fonts/open-iconic.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SyncfusionExamples/blazor-localization/3cb6e78307642d776a1d322b2aeab82ddd75b976/.NET5 Blazor Server App/Localization-with-static-culture/wwwroot/css/open-iconic/font/fonts/open-iconic.eot
--------------------------------------------------------------------------------
/.NET5 Blazor Server App/Localization-with-static-culture/wwwroot/css/open-iconic/font/fonts/open-iconic.otf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SyncfusionExamples/blazor-localization/3cb6e78307642d776a1d322b2aeab82ddd75b976/.NET5 Blazor Server App/Localization-with-static-culture/wwwroot/css/open-iconic/font/fonts/open-iconic.otf
--------------------------------------------------------------------------------
/.NET5 Blazor Server App/Localization-with-static-culture/wwwroot/css/open-iconic/font/fonts/open-iconic.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SyncfusionExamples/blazor-localization/3cb6e78307642d776a1d322b2aeab82ddd75b976/.NET5 Blazor Server App/Localization-with-static-culture/wwwroot/css/open-iconic/font/fonts/open-iconic.ttf
--------------------------------------------------------------------------------
/.NET5 Blazor Server App/Localization-with-static-culture/wwwroot/css/open-iconic/font/fonts/open-iconic.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SyncfusionExamples/blazor-localization/3cb6e78307642d776a1d322b2aeab82ddd75b976/.NET5 Blazor Server App/Localization-with-static-culture/wwwroot/css/open-iconic/font/fonts/open-iconic.woff
--------------------------------------------------------------------------------
/.NET5 Blazor Server App/Localization-with-static-culture/wwwroot/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SyncfusionExamples/blazor-localization/3cb6e78307642d776a1d322b2aeab82ddd75b976/.NET5 Blazor Server App/Localization-with-static-culture/wwwroot/favicon.ico
--------------------------------------------------------------------------------
/.NET5 Blazor WASM App/Localization-with-dynamic-culture/.gitignore:
--------------------------------------------------------------------------------
1 | .vs
2 | bin/
3 | obj/
--------------------------------------------------------------------------------
/.NET5 Blazor WASM App/Localization-with-dynamic-culture/App.razor:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
2 |
3 | @Title
4 |
5 |
6 | Please take our
7 | brief survey
8 |
9 | and tell us what you think.
10 |
11 |
12 | @code {
13 | // Demonstrates how a parent component can supply parameters
14 | [Parameter]
15 | public string Title { get; set; }
16 | }
17 |
--------------------------------------------------------------------------------
/.NET5 Blazor WASM App/Localization-with-static-culture/Client/Shared/SyncfusionLocalizer.cs:
--------------------------------------------------------------------------------
1 |
2 | using Syncfusion.Blazor;
3 |
4 | namespace LocalizationWASMSample.Client.Shared
5 | {
6 | public class SyncfusionLocalizer : ISyncfusionStringLocalizer
7 | {
8 | // To get the locale key from mapped resources file
9 | public string GetText(string key)
10 | {
11 | return this.ResourceManager.GetString(key);
12 | }
13 |
14 | // To access the resource file and get the exact value for locale key
15 | public System.Resources.ResourceManager ResourceManager
16 | {
17 | get
18 | {
19 | // Replace the ApplicationNamespace with your application name.
20 | return LocalizationWASMSample.Client.Resources.SfResources.ResourceManager;
21 | }
22 | }
23 | }
24 | }
--------------------------------------------------------------------------------
/.NET5 Blazor WASM App/Localization-with-static-culture/Client/_Imports.razor:
--------------------------------------------------------------------------------
1 | @using System.Net.Http
2 | @using System.Net.Http.Json
3 | @using Microsoft.AspNetCore.Components.Forms
4 | @using Microsoft.AspNetCore.Components.Routing
5 | @using Microsoft.AspNetCore.Components.Web
6 | @using Microsoft.AspNetCore.Components.WebAssembly.Http
7 | @using Microsoft.JSInterop
8 | @using LocalizationWASMSample.Client
9 | @using LocalizationWASMSample.Client.Shared
10 | @using Syncfusion.Blazor
11 | @using Syncfusion.Blazor.Grids
--------------------------------------------------------------------------------
/.NET5 Blazor WASM App/Localization-with-static-culture/Client/wwwroot/css/open-iconic/ICON-LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2014 Waybury
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in
13 | all copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | THE SOFTWARE.
--------------------------------------------------------------------------------
/.NET5 Blazor WASM App/Localization-with-static-culture/Client/wwwroot/css/open-iconic/font/fonts/open-iconic.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SyncfusionExamples/blazor-localization/3cb6e78307642d776a1d322b2aeab82ddd75b976/.NET5 Blazor WASM App/Localization-with-static-culture/Client/wwwroot/css/open-iconic/font/fonts/open-iconic.eot
--------------------------------------------------------------------------------
/.NET5 Blazor WASM App/Localization-with-static-culture/Client/wwwroot/css/open-iconic/font/fonts/open-iconic.otf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SyncfusionExamples/blazor-localization/3cb6e78307642d776a1d322b2aeab82ddd75b976/.NET5 Blazor WASM App/Localization-with-static-culture/Client/wwwroot/css/open-iconic/font/fonts/open-iconic.otf
--------------------------------------------------------------------------------
/.NET5 Blazor WASM App/Localization-with-static-culture/Client/wwwroot/css/open-iconic/font/fonts/open-iconic.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SyncfusionExamples/blazor-localization/3cb6e78307642d776a1d322b2aeab82ddd75b976/.NET5 Blazor WASM App/Localization-with-static-culture/Client/wwwroot/css/open-iconic/font/fonts/open-iconic.ttf
--------------------------------------------------------------------------------
/.NET5 Blazor WASM App/Localization-with-static-culture/Client/wwwroot/css/open-iconic/font/fonts/open-iconic.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SyncfusionExamples/blazor-localization/3cb6e78307642d776a1d322b2aeab82ddd75b976/.NET5 Blazor WASM App/Localization-with-static-culture/Client/wwwroot/css/open-iconic/font/fonts/open-iconic.woff
--------------------------------------------------------------------------------
/.NET5 Blazor WASM App/Localization-with-static-culture/Client/wwwroot/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SyncfusionExamples/blazor-localization/3cb6e78307642d776a1d322b2aeab82ddd75b976/.NET5 Blazor WASM App/Localization-with-static-culture/Client/wwwroot/favicon.ico
--------------------------------------------------------------------------------
/.NET5 Blazor WASM App/Localization-with-static-culture/Client/wwwroot/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | LocalizationWASMSample
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 | Loading...
17 |
18 |
19 | An unhandled error has occurred.
20 | Reload
21 | 🗙
22 |
20 | Swapping to the Development environment displays detailed information about the error that occurred.
21 |
22 |
23 | The Development environment shouldn't be enabled for deployed applications.
24 | It can result in displaying sensitive information from exceptions to end users.
25 | For local debugging, enable the Development environment by setting the ASPNETCORE_ENVIRONMENT environment variable to Development
26 | and restarting the app.
27 |
2 |
3 | @Title
4 |
5 |
6 | Please take our
7 | brief survey
8 |
9 | and tell us what you think.
10 |
11 |
12 | @code {
13 | // Demonstrates how a parent component can supply parameters
14 | [Parameter]
15 | public string? Title { get; set; }
16 | }
17 |
--------------------------------------------------------------------------------
/.NET6 Blazor Server App/Localization-with-dynamic-culture/Shared/SyncfusionLocalizer.cs:
--------------------------------------------------------------------------------
1 | using Syncfusion.Blazor;
2 |
3 | namespace LocalizationServer.Shared
4 | {
5 | public class SyncfusionLocalizer : ISyncfusionStringLocalizer
6 | {
7 | // To get the locale key from mapped resources file
8 | public string GetText(string key)
9 | {
10 | return this.ResourceManager.GetString(key);
11 | }
12 |
13 | // To access the resource file and get the exact value for locale key
14 |
15 | public System.Resources.ResourceManager ResourceManager
16 | {
17 | get
18 | {
19 | // Replace the ApplicationNamespace with your application name.
20 | return LocalizationServer.Resources.SfResources.ResourceManager;
21 | }
22 | }
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/.NET6 Blazor Server App/Localization-with-dynamic-culture/_Imports.razor:
--------------------------------------------------------------------------------
1 | @using System.Net.Http
2 | @using Microsoft.AspNetCore.Authorization
3 | @using Microsoft.AspNetCore.Components.Authorization
4 | @using Microsoft.AspNetCore.Components.Forms
5 | @using Microsoft.AspNetCore.Components.Routing
6 | @using Microsoft.AspNetCore.Components.Web
7 | @using Microsoft.AspNetCore.Components.Web.Virtualization
8 | @using Microsoft.JSInterop
9 | @using LocalizationServer
10 | @using LocalizationServer.Shared
11 | @using Syncfusion.Blazor
12 | @using Syncfusion.Blazor.Grids
--------------------------------------------------------------------------------
/.NET6 Blazor Server App/Localization-with-dynamic-culture/appsettings.Development.json:
--------------------------------------------------------------------------------
1 | {
2 | "DetailedErrors": true,
3 | "Logging": {
4 | "LogLevel": {
5 | "Default": "Information",
6 | "Microsoft.AspNetCore": "Warning"
7 | }
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/.NET6 Blazor Server App/Localization-with-dynamic-culture/appsettings.json:
--------------------------------------------------------------------------------
1 | {
2 | "Logging": {
3 | "LogLevel": {
4 | "Default": "Information",
5 | "Microsoft.AspNetCore": "Warning"
6 | }
7 | },
8 | "AllowedHosts": "*"
9 | }
10 |
--------------------------------------------------------------------------------
/.NET6 Blazor Server App/Localization-with-dynamic-culture/wwwroot/css/open-iconic/ICON-LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2014 Waybury
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in
13 | all copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | THE SOFTWARE.
--------------------------------------------------------------------------------
/.NET6 Blazor Server App/Localization-with-dynamic-culture/wwwroot/css/open-iconic/font/fonts/open-iconic.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SyncfusionExamples/blazor-localization/3cb6e78307642d776a1d322b2aeab82ddd75b976/.NET6 Blazor Server App/Localization-with-dynamic-culture/wwwroot/css/open-iconic/font/fonts/open-iconic.eot
--------------------------------------------------------------------------------
/.NET6 Blazor Server App/Localization-with-dynamic-culture/wwwroot/css/open-iconic/font/fonts/open-iconic.otf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SyncfusionExamples/blazor-localization/3cb6e78307642d776a1d322b2aeab82ddd75b976/.NET6 Blazor Server App/Localization-with-dynamic-culture/wwwroot/css/open-iconic/font/fonts/open-iconic.otf
--------------------------------------------------------------------------------
/.NET6 Blazor Server App/Localization-with-dynamic-culture/wwwroot/css/open-iconic/font/fonts/open-iconic.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SyncfusionExamples/blazor-localization/3cb6e78307642d776a1d322b2aeab82ddd75b976/.NET6 Blazor Server App/Localization-with-dynamic-culture/wwwroot/css/open-iconic/font/fonts/open-iconic.ttf
--------------------------------------------------------------------------------
/.NET6 Blazor Server App/Localization-with-dynamic-culture/wwwroot/css/open-iconic/font/fonts/open-iconic.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SyncfusionExamples/blazor-localization/3cb6e78307642d776a1d322b2aeab82ddd75b976/.NET6 Blazor Server App/Localization-with-dynamic-culture/wwwroot/css/open-iconic/font/fonts/open-iconic.woff
--------------------------------------------------------------------------------
/.NET6 Blazor Server App/Localization-with-dynamic-culture/wwwroot/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SyncfusionExamples/blazor-localization/3cb6e78307642d776a1d322b2aeab82ddd75b976/.NET6 Blazor Server App/Localization-with-dynamic-culture/wwwroot/favicon.ico
--------------------------------------------------------------------------------
/.NET6 Blazor Server App/Localization-with-static-culture/App.razor:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | Not found
8 |
9 |
2 |
3 | @Title
4 |
5 |
6 | Please take our
7 | brief survey
8 |
9 | and tell us what you think.
10 |
11 |
12 | @code {
13 | // Demonstrates how a parent component can supply parameters
14 | [Parameter]
15 | public string? Title { get; set; }
16 | }
17 |
--------------------------------------------------------------------------------
/.NET6 Blazor Server App/Localization-with-static-culture/Shared/SyncfusionLocalizer.cs:
--------------------------------------------------------------------------------
1 | using Syncfusion.Blazor;
2 |
3 | namespace LocalizationServerApp.Shared
4 | {
5 | public class SyncfusionLocalizer : ISyncfusionStringLocalizer
6 | {
7 | // To get the locale key from mapped resources file
8 | public string GetText(string key)
9 | {
10 | return this.ResourceManager.GetString(key);
11 | }
12 |
13 | // To access the resource file and get the exact value for locale key
14 | public System.Resources.ResourceManager ResourceManager
15 | {
16 | get
17 | {
18 | // Replace the ApplicationNamespace with your application name.
19 | return LocalizationServerApp.Resources.SfResources.ResourceManager;
20 | }
21 | }
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/.NET6 Blazor Server App/Localization-with-static-culture/_Imports.razor:
--------------------------------------------------------------------------------
1 | @using System.Net.Http
2 | @using Microsoft.AspNetCore.Authorization
3 | @using Microsoft.AspNetCore.Components.Authorization
4 | @using Microsoft.AspNetCore.Components.Forms
5 | @using Microsoft.AspNetCore.Components.Routing
6 | @using Microsoft.AspNetCore.Components.Web
7 | @using Microsoft.AspNetCore.Components.Web.Virtualization
8 | @using Microsoft.JSInterop
9 | @using LocalizationServerApp
10 | @using LocalizationServerApp.Shared
11 | @using Syncfusion.Blazor
12 | @using Syncfusion.Blazor.Grids
--------------------------------------------------------------------------------
/.NET6 Blazor Server App/Localization-with-static-culture/appsettings.Development.json:
--------------------------------------------------------------------------------
1 | {
2 | "DetailedErrors": true,
3 | "Logging": {
4 | "LogLevel": {
5 | "Default": "Information",
6 | "Microsoft.AspNetCore": "Warning"
7 | }
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/.NET6 Blazor Server App/Localization-with-static-culture/appsettings.json:
--------------------------------------------------------------------------------
1 | {
2 | "Logging": {
3 | "LogLevel": {
4 | "Default": "Information",
5 | "Microsoft.AspNetCore": "Warning"
6 | }
7 | },
8 | "AllowedHosts": "*"
9 | }
10 |
--------------------------------------------------------------------------------
/.NET6 Blazor Server App/Localization-with-static-culture/wwwroot/css/open-iconic/ICON-LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2014 Waybury
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in
13 | all copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | THE SOFTWARE.
--------------------------------------------------------------------------------
/.NET6 Blazor Server App/Localization-with-static-culture/wwwroot/css/open-iconic/font/fonts/open-iconic.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SyncfusionExamples/blazor-localization/3cb6e78307642d776a1d322b2aeab82ddd75b976/.NET6 Blazor Server App/Localization-with-static-culture/wwwroot/css/open-iconic/font/fonts/open-iconic.eot
--------------------------------------------------------------------------------
/.NET6 Blazor Server App/Localization-with-static-culture/wwwroot/css/open-iconic/font/fonts/open-iconic.otf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SyncfusionExamples/blazor-localization/3cb6e78307642d776a1d322b2aeab82ddd75b976/.NET6 Blazor Server App/Localization-with-static-culture/wwwroot/css/open-iconic/font/fonts/open-iconic.otf
--------------------------------------------------------------------------------
/.NET6 Blazor Server App/Localization-with-static-culture/wwwroot/css/open-iconic/font/fonts/open-iconic.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SyncfusionExamples/blazor-localization/3cb6e78307642d776a1d322b2aeab82ddd75b976/.NET6 Blazor Server App/Localization-with-static-culture/wwwroot/css/open-iconic/font/fonts/open-iconic.ttf
--------------------------------------------------------------------------------
/.NET6 Blazor Server App/Localization-with-static-culture/wwwroot/css/open-iconic/font/fonts/open-iconic.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SyncfusionExamples/blazor-localization/3cb6e78307642d776a1d322b2aeab82ddd75b976/.NET6 Blazor Server App/Localization-with-static-culture/wwwroot/css/open-iconic/font/fonts/open-iconic.woff
--------------------------------------------------------------------------------
/.NET6 Blazor Server App/Localization-with-static-culture/wwwroot/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SyncfusionExamples/blazor-localization/3cb6e78307642d776a1d322b2aeab82ddd75b976/.NET6 Blazor Server App/Localization-with-static-culture/wwwroot/favicon.ico
--------------------------------------------------------------------------------
/.NET6 Blazor WASM App/Localization-with-dynamic-culture/App.razor:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | Not found
8 |
9 |
2 |
3 | @Title
4 |
5 |
6 | Please take our
7 | brief survey
8 |
9 | and tell us what you think.
10 |
11 |
12 | @code {
13 | // Demonstrates how a parent component can supply parameters
14 | [Parameter]
15 | public string? Title { get; set; }
16 | }
17 |
--------------------------------------------------------------------------------
/.NET6 Blazor WASM App/Localization-with-dynamic-culture/Shared/SyncfusionLocalizer.cs:
--------------------------------------------------------------------------------
1 | using Syncfusion.Blazor;
2 |
3 | namespace LocalizationSample.Shared
4 | {
5 | public class SyncfusionLocalizer : ISyncfusionStringLocalizer
6 | {
7 | // To get the locale key from mapped resources file
8 | public string GetText(string key)
9 | {
10 | return this.ResourceManager.GetString(key);
11 | }
12 |
13 | // To access the resource file and get the exact value for locale key
14 |
15 | public System.Resources.ResourceManager ResourceManager
16 | {
17 | get
18 | {
19 | // Replace the ApplicationNamespace with your application name.
20 | return LocalizationSample.Resources.SfResources.ResourceManager;
21 | }
22 | }
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/.NET6 Blazor WASM App/Localization-with-dynamic-culture/_Imports.razor:
--------------------------------------------------------------------------------
1 | @using System.Net.Http
2 | @using System.Net.Http.Json
3 | @using Microsoft.AspNetCore.Components.Forms
4 | @using Microsoft.AspNetCore.Components.Routing
5 | @using Microsoft.AspNetCore.Components.Web
6 | @using Microsoft.AspNetCore.Components.Web.Virtualization
7 | @using Microsoft.AspNetCore.Components.WebAssembly.Http
8 | @using Microsoft.JSInterop
9 | @using LocalizationSample
10 | @using LocalizationSample.Shared
11 | @using Syncfusion.Blazor
12 | @using Syncfusion.Blazor.Grids
--------------------------------------------------------------------------------
/.NET6 Blazor WASM App/Localization-with-dynamic-culture/wwwroot/css/open-iconic/ICON-LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2014 Waybury
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in
13 | all copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | THE SOFTWARE.
--------------------------------------------------------------------------------
/.NET6 Blazor WASM App/Localization-with-dynamic-culture/wwwroot/css/open-iconic/font/fonts/open-iconic.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SyncfusionExamples/blazor-localization/3cb6e78307642d776a1d322b2aeab82ddd75b976/.NET6 Blazor WASM App/Localization-with-dynamic-culture/wwwroot/css/open-iconic/font/fonts/open-iconic.eot
--------------------------------------------------------------------------------
/.NET6 Blazor WASM App/Localization-with-dynamic-culture/wwwroot/css/open-iconic/font/fonts/open-iconic.otf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SyncfusionExamples/blazor-localization/3cb6e78307642d776a1d322b2aeab82ddd75b976/.NET6 Blazor WASM App/Localization-with-dynamic-culture/wwwroot/css/open-iconic/font/fonts/open-iconic.otf
--------------------------------------------------------------------------------
/.NET6 Blazor WASM App/Localization-with-dynamic-culture/wwwroot/css/open-iconic/font/fonts/open-iconic.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SyncfusionExamples/blazor-localization/3cb6e78307642d776a1d322b2aeab82ddd75b976/.NET6 Blazor WASM App/Localization-with-dynamic-culture/wwwroot/css/open-iconic/font/fonts/open-iconic.ttf
--------------------------------------------------------------------------------
/.NET6 Blazor WASM App/Localization-with-dynamic-culture/wwwroot/css/open-iconic/font/fonts/open-iconic.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SyncfusionExamples/blazor-localization/3cb6e78307642d776a1d322b2aeab82ddd75b976/.NET6 Blazor WASM App/Localization-with-dynamic-culture/wwwroot/css/open-iconic/font/fonts/open-iconic.woff
--------------------------------------------------------------------------------
/.NET6 Blazor WASM App/Localization-with-dynamic-culture/wwwroot/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SyncfusionExamples/blazor-localization/3cb6e78307642d776a1d322b2aeab82ddd75b976/.NET6 Blazor WASM App/Localization-with-dynamic-culture/wwwroot/favicon.ico
--------------------------------------------------------------------------------
/.NET6 Blazor WASM App/Localization-with-dynamic-culture/wwwroot/icon-192.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SyncfusionExamples/blazor-localization/3cb6e78307642d776a1d322b2aeab82ddd75b976/.NET6 Blazor WASM App/Localization-with-dynamic-culture/wwwroot/icon-192.png
--------------------------------------------------------------------------------
/.NET6 Blazor WASM App/Localization-with-dynamic-culture/wwwroot/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | LocalizationSample
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
Loading...
18 |
19 |
20 | An unhandled error has occurred.
21 | Reload
22 | 🗙
23 |
2 |
3 | @Title
4 |
5 |
6 | Please take our
7 | brief survey
8 |
9 | and tell us what you think.
10 |
11 |
12 | @code {
13 | // Demonstrates how a parent component can supply parameters
14 | [Parameter]
15 | public string? Title { get; set; }
16 | }
17 |
--------------------------------------------------------------------------------
/.NET6 Blazor WASM App/Localization-with-static-culture/Client/Shared/SyncfusionLocalizer.cs:
--------------------------------------------------------------------------------
1 | using Syncfusion.Blazor;
2 |
3 | namespace LocalizationWASMApp.Client.Shared
4 | {
5 | public class SyncfusionLocalizer : ISyncfusionStringLocalizer
6 | {
7 | // To get the locale key from mapped resources file
8 | public string GetText(string key)
9 | {
10 | return this.ResourceManager.GetString(key);
11 | }
12 |
13 | // To access the resource file and get the exact value for locale key
14 | public System.Resources.ResourceManager ResourceManager
15 | {
16 | get
17 | {
18 | // Replace the ApplicationNamespace with your application name.
19 | return LocalizationWASMApp.Client.Resources.SfResources.ResourceManager;
20 | }
21 | }
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/.NET6 Blazor WASM App/Localization-with-static-culture/Client/_Imports.razor:
--------------------------------------------------------------------------------
1 | @using System.Net.Http
2 | @using System.Net.Http.Json
3 | @using Microsoft.AspNetCore.Components.Forms
4 | @using Microsoft.AspNetCore.Components.Routing
5 | @using Microsoft.AspNetCore.Components.Web
6 | @using Microsoft.AspNetCore.Components.Web.Virtualization
7 | @using Microsoft.AspNetCore.Components.WebAssembly.Http
8 | @using Microsoft.JSInterop
9 | @using LocalizationWASMApp.Client
10 | @using LocalizationWASMApp.Client.Shared
11 | @using Syncfusion.Blazor
12 | @using Syncfusion.Blazor.Grids
--------------------------------------------------------------------------------
/.NET6 Blazor WASM App/Localization-with-static-culture/Client/wwwroot/css/open-iconic/ICON-LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2014 Waybury
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in
13 | all copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | THE SOFTWARE.
--------------------------------------------------------------------------------
/.NET6 Blazor WASM App/Localization-with-static-culture/Client/wwwroot/css/open-iconic/font/fonts/open-iconic.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SyncfusionExamples/blazor-localization/3cb6e78307642d776a1d322b2aeab82ddd75b976/.NET6 Blazor WASM App/Localization-with-static-culture/Client/wwwroot/css/open-iconic/font/fonts/open-iconic.eot
--------------------------------------------------------------------------------
/.NET6 Blazor WASM App/Localization-with-static-culture/Client/wwwroot/css/open-iconic/font/fonts/open-iconic.otf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SyncfusionExamples/blazor-localization/3cb6e78307642d776a1d322b2aeab82ddd75b976/.NET6 Blazor WASM App/Localization-with-static-culture/Client/wwwroot/css/open-iconic/font/fonts/open-iconic.otf
--------------------------------------------------------------------------------
/.NET6 Blazor WASM App/Localization-with-static-culture/Client/wwwroot/css/open-iconic/font/fonts/open-iconic.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SyncfusionExamples/blazor-localization/3cb6e78307642d776a1d322b2aeab82ddd75b976/.NET6 Blazor WASM App/Localization-with-static-culture/Client/wwwroot/css/open-iconic/font/fonts/open-iconic.ttf
--------------------------------------------------------------------------------
/.NET6 Blazor WASM App/Localization-with-static-culture/Client/wwwroot/css/open-iconic/font/fonts/open-iconic.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SyncfusionExamples/blazor-localization/3cb6e78307642d776a1d322b2aeab82ddd75b976/.NET6 Blazor WASM App/Localization-with-static-culture/Client/wwwroot/css/open-iconic/font/fonts/open-iconic.woff
--------------------------------------------------------------------------------
/.NET6 Blazor WASM App/Localization-with-static-culture/Client/wwwroot/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SyncfusionExamples/blazor-localization/3cb6e78307642d776a1d322b2aeab82ddd75b976/.NET6 Blazor WASM App/Localization-with-static-culture/Client/wwwroot/favicon.ico
--------------------------------------------------------------------------------
/.NET6 Blazor WASM App/Localization-with-static-culture/Client/wwwroot/icon-192.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SyncfusionExamples/blazor-localization/3cb6e78307642d776a1d322b2aeab82ddd75b976/.NET6 Blazor WASM App/Localization-with-static-culture/Client/wwwroot/icon-192.png
--------------------------------------------------------------------------------
/.NET6 Blazor WASM App/Localization-with-static-culture/Client/wwwroot/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | LocalizationWASMApp
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
Loading...
18 |
19 |
20 | An unhandled error has occurred.
21 | Reload
22 | 🗙
23 |
23 | An unhandled error has occurred.
24 | Reload
25 | 🗙
26 |
27 |
28 |
29 |
30 |
31 |
32 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Blazor Localization Examples
2 |
3 | Localization examples showing localization of Syncfusion Blazor UI components in Blazor Server and Blazor WebAssembly application.
4 |
5 | ## Prerequisites
6 |
7 | * Visual Studio 2022
8 |
9 | ## How to run the project
10 |
11 | * Checkout this project to a location in your disk.
12 | * Open the specified application from the following folder either `.NET5 Blazor Server App` or `.NET5 Blazor WASM App` or `.NET6 Blazor Server App` or `.NET6 Blazor WASM App`.
13 | * Restore the NuGet packages by rebuilding the solution.
14 | * Run the project.
15 |
16 | > Always use latest resource (resx) files from [blazor locale](https://github.com/syncfusion/blazor-locale) repo.
17 |
18 | ## See also
19 |
20 | * [Blazor Localization documentation](https://blazor.syncfusion.com/documentation/common/localization/)
21 |
--------------------------------------------------------------------------------
/dynamic-output.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SyncfusionExamples/blazor-localization/3cb6e78307642d776a1d322b2aeab82ddd75b976/dynamic-output.png
--------------------------------------------------------------------------------
/static-output.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SyncfusionExamples/blazor-localization/3cb6e78307642d776a1d322b2aeab82ddd75b976/static-output.png
--------------------------------------------------------------------------------