Kebechet
Kebechet

Reputation: 2387

Localization - .NET MAUI Hybrid + API + Translation Blazor server

We have a .NET MAUI Hybrid app that needs translations. The usual way to do this is to use .resx files but based on our requirements they are not good enough.

Architecture:

Our theoretical approach

Proposed flow:

Questions:

Upvotes: 4

Views: 874

Answers (2)

Kebechet
Kebechet

Reputation: 2387

I had a call with one Software architect and he didnt like this JSON idea.

The reason for me to reinvent the wheel was the lack of tools, because simple usage of .resx file is PITA.

I found that MS created some tool called Microsoft multilingual toolkit that should simplify it, but from a few videos I have seen, it looks horrible. On the other hand I got a recommendation for a tool called ResXManager. This tool was the missing part in our workflow.

So our new translation workflow is split into 2 parts:

  • client-side translations - for text in app that doesnt change or is okay when it updates just after release. Usually page names, labels etc.
  • dynamic translations - in our case exercise translations. We dont want to redeploy app each time when we add new exercise, so thats why the exercise translation is currently stored on API in .resx file. (still we have to redeploy API to make them available).

Summary:

  • the client part is working great and is super-fast, because app doesnt have to ask API if there is a new language.
  • the dynamic part not so much. It works okay but we have a few pain-points:
    • we have to redeploy api each time we add an exercise
      • this could be solved by some external storage for translation management (and versioning)
    • we have an admin panel (on web) where we create new exercises and their metadata, but to integrate ResXManager into our flow, we would have to download translations locally, do changes and uplaod them again because the ResXManager is just desktop app.

I will update this answer in case we found some flow improvements.

Upvotes: 0

H.A.H.
H.A.H.

Reputation: 3907

One of the very first things, that I have done about localization, was something very similar to this.

XML file, containing serialized dictionary, saved on Windows Mobile device, with code using NET Compact Framework 2.0.

It works. And this is the only good thing I can say about it.

You see, localization is not just some key-value pairs, that you store somewhere. Just because you see "Hallo" instead of "Hello", it does not mean that your app is now perfectly fit for German people.

At some point, I started to stick to what is generally used, working stable and easy to implement.

You are planning to do the opposite.

(This is opinion based, but your question leads that way anyway)

Upvotes: 2

Related Questions