@ -1,59 +1,118 @@ |
|||
BASTA! Mainz 2023 has wrapped up, and what an extraordinary journey it has been! We can’t wait to share our impressions, highlights, and the incredible impact it had on the tech community in Germany and beyond. |
|||
|
|||
### A Glance Back at BASTA! Mainz 2023
|
|||
|
|||
|
|||
We just came back from the[ BASTA! Conference 2023](https://basta.net/), which is an incredible .NET event with over 600 in-person attendees and an additional 200+ tuning in virtually from across the globe. The buzz of excitement and anticipation in the air was undeniable, setting the stage for an unforgettable event for [ABP.IO](https://abp.io/). |
|||
|
|||
 |
|||
|
|||
 |
|||
|
|||
 |
|||
|
|||
As one of the proud sponsors, we set up our booth, engaged with attendees, and delved into a wide range of sessions, workshops, and keynotes to absorb the latest software development trends. |
|||
|
|||
### Engaging with Enthusiastic Minds
|
|||
|
|||
|
|||
As the lead developers of ABP Core Team, *[Alper](https://twitter.com/alperebicoglu)* and *[Ismail](https://twitter.com/ismcagdas)* presented the ABP.IO platform modules and features were quite busy enjoying their presenting work with latest version of demos. Alper also gave a great speech on “Building Multi-tenant ASP.NET Core Application & the ABP Framework” at the BASTA! Mainz conference. |
|||
|
|||
 |
|||
|
|||
 |
|||
|
|||
We introduced **[ABP Framework](https://abp.io/)**, community-driven open-source web application framework, and **[ABP Commercial](https://commercial.abp.io/)**, our enterprise-ready web development platform that is built on top of the open-source ABP Framework to the crowds. |
|||
|
|||
 |
|||
|
|||
 |
|||
|
|||
 |
|||
|
|||
Apart from that, we were thrilled to give away the **[ABP Commercial Licenses](https://commercial.abp.io/pricing)** to the eager attendees on the venue, including the Raffle prize, **Meta Quest 2**, on our last day in BASTA! Conference. |
|||
|
|||
 |
|||
|
|||
We are profoundly satisfied with the huge interest and engagement shown by the attendees. The sense of community, collaboration, and shared passion for .NET solutions was palpable throughout the event. |
|||
|
|||
 |
|||
|
|||
 |
|||
|
|||
 |
|||
|
|||
### A Great Partnership with LIS GmbH
|
|||
|
|||
|
|||
 |
|||
|
|||
At BASTA! Mainz 2023, we were particularly thrilled to celebrate our collaboration with ***LIS GmbH***, a leading software solutions provider. This partnership added a unique dimension to the conference, brought us a fresh perspective to the conference, fostering innovation and opening up new avenues for attendees. |
|||
|
|||
### A Big Thank-You from ABP Team
|
|||
|
|||
|
|||
 |
|||
|
|||
Now, a shout-out to BASTA! Mainz 2023. We want to thank to everyone who contributed to the success of this event – attendees, speakers, sponsors, and partners.The conference may have ended, but the knowledge gained, connections formed, and inspiration ignited will continue to shape the tech landscape for years to come. |
|||
|
|||
Until next time! |
|||
BASTA! Mainz 2023 has wrapped up, and what an extraordinary journey it has been! We can’t wait to share our impressions, highlights, and the incredible impact it had on the tech community in Germany and beyond. |
|||
|
|||
|
|||
|
|||
### A Glance Back at BASTA! Mainz 2023 |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
We just came back from the[ BASTA! Conference 2023](https://basta.net/), which is an incredible .NET event with over 600 in-person attendees and an additional 200+ tuning in virtually from across the globe. The buzz of excitement and anticipation in the air was undeniable, setting the stage for an unforgettable event for [ABP.IO](https://abp.io/). |
|||
|
|||
|
|||
|
|||
 |
|||
|
|||
|
|||
|
|||
 |
|||
|
|||
|
|||
|
|||
 |
|||
|
|||
|
|||
|
|||
As one of the proud sponsors, we set up our booth, engaged with attendees, and delved into a wide range of sessions, workshops, and keynotes to absorb the latest software development trends. |
|||
|
|||
|
|||
|
|||
### Engaging with Enthusiastic Minds |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
As the lead developers of ABP Core Team, *[Alper](https://twitter.com/alperebicoglu)* and *[Ismail](https://twitter.com/ismcagdas)* presented the ABP.IO platform modules and features were quite busy enjoying their presenting work with latest version of demos. Alper also gave a great speech on “Building Multi-tenant ASP.NET Core Application & the ABP Framework” at the BASTA! Mainz conference. |
|||
|
|||
|
|||
|
|||
 |
|||
|
|||
|
|||
|
|||
 |
|||
|
|||
|
|||
|
|||
We introduced **[ABP Framework](https://abp.io/)**, community-driven open-source web application framework, and **[ABP Commercial](https://commercial.abp.io/)**, our enterprise-ready web development platform that is built on top of the open-source ABP Framework to the crowds. |
|||
|
|||
|
|||
|
|||
 |
|||
|
|||
|
|||
|
|||
 |
|||
|
|||
|
|||
|
|||
 |
|||
|
|||
|
|||
|
|||
Apart from that, we were thrilled to give away the **[ABP Commercial Licenses](https://commercial.abp.io/pricing)** to the eager attendees on the venue, including the Raffle prize, **Meta Quest 2**, on our last day in BASTA! Conference. |
|||
|
|||
|
|||
|
|||
 |
|||
|
|||
|
|||
|
|||
We are profoundly satisfied with the huge interest and engagement shown by the attendees. The sense of community, collaboration, and shared passion for .NET solutions was palpable throughout the event. |
|||
|
|||
|
|||
|
|||
 |
|||
|
|||
|
|||
|
|||
 |
|||
|
|||
|
|||
|
|||
 |
|||
|
|||
|
|||
|
|||
### A Great Partnership with LIS GmbH |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
 |
|||
|
|||
|
|||
|
|||
|
|||
At BASTA! Mainz 2023, we were particularly thrilled to celebrate our collaboration with ***LIS GmbH***, a leading software solutions provider. This partnership added a unique dimension to the conference, brought us a fresh perspective to the conference, fostering innovation and opening up new avenues for attendees. |
|||
|
|||
|
|||
|
|||
### A Big Thank-You from ABP Team |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
 |
|||
|
|||
|
|||
|
|||
Now, a shout-out to BASTA! Mainz 2023. We want to thank to everyone who contributed to the success of this event – attendees, speakers, sponsors, and partners.The conference may have ended, but the knowledge gained, connections formed, and inspiration ignited will continue to shape the tech landscape for years to come. |
|||
|
|||
|
|||
|
|||
Until next time! |
|||
|
|||
@ -0,0 +1,134 @@ |
|||
# URL-Based Localization |
|||
|
|||
In this article I'll show you how to optimize your ABP website localization with a URL parameter. URL Paths are commonly being used to change the current UI culture. This method makes our website SEO-Friendly as you structuring the URLs for multiple languages. And you can also share the link of your website with a specific language. Let's see implementing multi-language support with URL parameters in an ABP project. |
|||
|
|||
 |
|||
|
|||
|
|||
|
|||
## Mastering Website Localization: Language Codes in URLs Explained |
|||
|
|||
Enhancing UX with URL-Based website localization is mainly done with ASP.NET Core's routing system. Also we need to automatically redirect the links without language code parameter. Our URL structures for the localization will be as following: |
|||
|
|||
- https://mywebsite.com/en/dashboard (English) |
|||
- https://mywebsite.com/tr/dashboard (Turkish) |
|||
|
|||
|
|||
|
|||
## Routing |
|||
|
|||
Before starting to explain how to do this, you can see [this commit](https://github.com/salihozkara/MultiLangRoute/commit/09e40cfd751562dec0dab890e54e0c5ca9ee256c) which implements this functionality. The routing module consists of these fundamental classes: |
|||
|
|||
### 1. **MultiLanguageSupportMetaData.cs** |
|||
|
|||
This class is used to add a language parameter to route templates. For example, it changes the `/about` route to `/language/about`. |
|||
|
|||
### 2. **MultiLanguageRedirectRequiredMetaData.cs** |
|||
|
|||
This class is used to redirect users to the correct language version. If a user visits the `/about` page and the current culture is `"tr-TR"`, this class will redirect them to `/tr-TR/about`. |
|||
|
|||
### 3. **UrlNormalizer.cs** |
|||
|
|||
This static class is used to normalize URLs by adding language information and improving performance using caching. |
|||
|
|||
```csharp |
|||
public static string NormalizeUrl(EndpointDataSource endpointDataSource, HttpContext httpContext, string url) |
|||
{ |
|||
// Normalize the URL and cache it |
|||
return Cache.GetOrAdd(url, (key) => |
|||
{ |
|||
var absoluteUrl = GetAbsoluteUrl(key); |
|||
var multiLanguageRedirectRequiredMetaData = |
|||
GetMultiLanguageRedirectRequiredMetaData(endpointDataSource, absoluteUrl); |
|||
return multiLanguageRedirectRequiredMetaData?.ReBuildUrl(httpContext, key) ?? key; |
|||
}); |
|||
} |
|||
``` |
|||
|
|||
### 4. **MyLinkGenerator.cs** |
|||
|
|||
This class extends ASP.NET Core’s `LinkGenerator` class to automatically add language information to all generated links. |
|||
|
|||
### 5. **MyRouteDataRequestCultureProvider.cs** |
|||
|
|||
This class determines the current culture using the language parameter in the URL. For example, it extracts the `"tr-TR"` culture from the `/tr-TR/about` URL. |
|||
|
|||
### 6. **RoutingMiddleware.cs** |
|||
|
|||
This middleware processes HTTP requests and redirects users to the correct language version when necessary. |
|||
|
|||
```csharp |
|||
public override Task InvokeAsync(HttpContext context, RequestDelegate next) |
|||
{ |
|||
var endpoint = context.GetEndpoint(); |
|||
if(endpoint is not RouteEndpoint) |
|||
{ |
|||
return next(context); |
|||
} |
|||
|
|||
// Redirect if necessary |
|||
var redirectMetaData = endpoint.Metadata.GetMetadata<IRedirectMetaData>(); |
|||
if (redirectMetaData is not null) |
|||
{ |
|||
redirectMetaData.Redirect(context); |
|||
return Task.CompletedTask; |
|||
} |
|||
|
|||
// ... |
|||
} |
|||
``` |
|||
|
|||
|
|||
|
|||
## CultureAnchorTagHelper.cs |
|||
|
|||
This **Tag Helper** processes `<a>` tags in a Razor page and automatically adds language information to URLs if it's missing. |
|||
|
|||
```csharp |
|||
[HtmlTargetElement("a", Attributes = "href", TagStructure = TagStructure.NormalOrSelfClosing)] |
|||
public class CultureAnchorTagHelper(EndpointDataSource endpointDataSource, IHttpContextAccessor contextAccessor) |
|||
: TagHelper, ITransientDependency |
|||
{ |
|||
public override void Process(TagHelperContext context, TagHelperOutput output) |
|||
{ |
|||
var href = output.Attributes["href"].Value.ToString(); |
|||
if (href != null) |
|||
{ |
|||
output.Attributes.SetAttribute("href", |
|||
UrlNormalizer.NormalizeUrl(endpointDataSource, contextAccessor.HttpContext!, href)); |
|||
} |
|||
} |
|||
} |
|||
``` |
|||
|
|||
**How This Tag Helper Works:** |
|||
|
|||
- Finds all `<a href="...">` tags within your Razor pages. |
|||
- Retrieves the `href` attribute of each link. |
|||
- Uses the `UrlNormalizer.NormalizeUrl()` method to normalize the URL with the current culture information. |
|||
- Replaces the original URL with the normalized one. |
|||
|
|||
For example, if the current culture is `"tr"` and a page contains `<a href="/about">`, this Tag Helper will transform it into `<a href="/tr-TR/about">`. |
|||
|
|||
|
|||
|
|||
## Sample Project |
|||
|
|||
Salih Özkara from ABP team created a sample working project which implements URL localization. He used ABP free tier MVC template and MongoDB. You can check out the related commit which implements URL localization: |
|||
|
|||
https://github.com/salihozkara/MultiLangRoute/commit/09e40cfd751562dec0dab890e54e0c5ca9ee256c |
|||
|
|||
And full working demo is available at: |
|||
|
|||
https://github.com/salihozkara/MultiLangRoute |
|||
|
|||
You can download the demo project at: |
|||
|
|||
[UrlLocalizationSampleProject.zip](https://github.com/abpframework/abp/blob/634ff52fb07d0b1281640695dbeffccdc943ca53/docs/en/Community-Articles/2024-03-05-URL-Based-Localization/UrlLocalizationSampleProject.zip) |
|||
|
|||
|
|||
|
|||
## Summary |
|||
|
|||
This implementation extends ASP.NET Core’s routing mechanism and utilizes caching for improved performance. It ensures multilingual support by normalizing URLs, redirecting users to the appropriate language version, and automatically handling language-specific links. |
|||
|
|||
|
After Width: | Height: | Size: 594 KiB |
|
After Width: | Height: | Size: 37 KiB |
|
After Width: | Height: | Size: 1.4 MiB |
|
After Width: | Height: | Size: 1.6 MiB |
|
After Width: | Height: | Size: 3.5 MiB |
|
After Width: | Height: | Size: 185 KiB |
|
After Width: | Height: | Size: 212 KiB |
|
After Width: | Height: | Size: 250 KiB |
@ -0,0 +1,28 @@ |
|||
We are excited to share some fantastic news with our community! We are proud to announce that ABP.IO is going to be at the BASTA! Conference on March 03-07, 2025 in Frankfurt and İsmail Çağdaş from our dev team is going to be a speaker on March 04! |
|||
|
|||
#### **About BASTA!**
|
|||
For those who don’t know, BASTA! is the leading independent conference for Microsoft technologies in the German-speaking world. For over 20 years, it has been setting standards in the areas of C#, .NET and cloud and web technologies and is considered a must-attend event for Microsoft, cloud, web developers and key players in the software industry. BASTA! is a conference for developers and IT professionals who want to stay up to date with the latest technologies. |
|||
|
|||
#### **ABP at [BASTA! Mainz 2023](https://abp.io/blog/BASTA-Mainz-2023-What-a-Blast-in-Germany)**
|
|||
 |
|||
|
|||
 |
|||
|
|||
 |
|||
#####
|
|||
#### **What to Expect at [BASTA! 2025](https://basta.net/frankfurt-en/)**
|
|||
The most exciting part is İsmail Çağdaş from the ABP developer team will be speaking at the conference on March 04 about the concepts of monoliths and microservices will be briefly explored, along with how modular monoliths bring together the advantages of these two architectures. Using the ABP Framework as an example, the session will highlight its modularity features and demonstrate how it can assist in creating and developing a modular monolith application. Finally, best practices for developing modular monoliths will be discussed, showing how these practices can pave the way for transitioning to a microservice-based architecture when necessary. |
|||
|
|||
If you want to find out more information about İsmail Çağdaş's session, [check here](https://basta.net/microservices-apis/modular-monoliths-architecture-abp/?loc=ffm): |
|||
|
|||
#### **Connect with Us**
|
|||
We have exciting raffles and surprises planned at our booth and look forward to sharing more information about our solutions with you there. |
|||
|
|||
#### **Join Us Online**
|
|||
Don't worry if you can't join us in person, our online booth is going to be there for you! The Expo of the online version of BASTA! is open for the main conference days. |
|||
|
|||
Tuesday, March 4, 2025: 9:00 am – approx. 6:00 pm |
|||
|
|||
Wednesday, March 5, 2025: 9:00 am – approx. 6:00 pm |
|||
|
|||
Thursday, March 6, 2025: 9:00 am – approx. 5:45 pm |
|||