Customization And Localization Of abp.io Default Validation Error Messages - localization

How can I Customize And Localize Of abp.io Default Validation Error Messages ?
I would add translated message for another language, instead of "The {fieldName} field is required."
How to do it in abp.io ?

You should see the Extending Existing Resource section here. AbpValidationResource is the resource type. You can find all the localization keys here.
I suggest you to fully read and understand the Localization document. Then you can make it easily. You will create translation JSON files in your application, make the files "embedded" then extend the resource.
If you want to add a new language and contribute to the ABP Framework, you can also see the Resource Localization section of the contribution guide.

Related

Are there custom properties in openapi 3?

We have php-swagger which generates developer documentation in open api 3.0 format.
There was a task - to make OTHER documentation based on the generated api-docs.json, for clients with a limited number of routes, static (without the ability to send requests). Just make a stripped down new openapi 3.0 format json file
It turns out that you need to somehow mark the annotations in the code that these are annotations for OTHER documentation. And create a new json file.
The problem is that I don’t know how to mark the routes at the annotation level in the php code, so that there would be some FEATURE in the description of the route, thanks to which I could parse api-docs.json and extract routes with this feature from it.
You could use vendor extensions https://zircote.github.io/swagger-php/guide/common-techniques.html#vendor-extensions
These are part of the standard but ignored so you can use them in whatever way you like.

iOS App Localisation Best Practices And Placeholders

We're currently at the stage of looking at localising our app in to multiple languages now that the general concepts of the app have been decided. This is something I want to ensure is done correct from the start to lower the risk of headaches in the future.
The app targets iOS 7 and above, uses storyboards, and is written in Swift.
Storyboards
When working with a storyboard (or a xib), what's the best way to mark a UI element as "not to be translated"? For example, I have a placeholder string for a user's display name (Display Name), which will be replaced by a users display name at run time. This display name will not be localised, but neither should the string "Display Name". Is there a method of not having a UI element's value automatically put in to the strings file? If not, is going in to that file and manually removing strings I don't want localising a sustainable option?
Strings In Code
I'm using the Swift function NSLocalizedString with the key and comment parameters. Some places I've seen say to set the key to be a unique id based on the context (e.g., intro.login-button-text), while others seem to just put the full string in the default language (e.g., Login). I like the idea of the unique ids for the key, but would this not go against the idea of the "base" language?
Exporting
Xcode 6's "Export For Localization" option seems very useful for getting the correct format of file to be sent to translators. However, as mentioned previously, placeholder text does not need to be translated. Should these placeholders be removed from the exported xliff or the strings file prior to export?
Looking for the the same questions myself. Hope this will help you and others. Also I would recommend to have some kind of tool to organize the xliff/string files
Storyboards:
I've seen developers putting non translating texts in storyboard with extra parentheses. i.e. {Display name}.
By using this you can see by the translation itself if it needs to be translated or not. We use oneskyapp.com and can select to hide those translations and they will be hidden for each import of that key.
Strings in Code
By following this thread they suggest to use keywords.
Best practice for key values in translation files
Exporting
I cannot find a way to have some translations automatically removed when exporting. Off course you can put the views which has dynamic fields in different XIB/storyboards and decide not to translate those.
Again a tool like onskyapp.com can help you with this.
Formats
As of context with the field is important and a translation can be different when it is followed by i.e. a users name I would go for "%1$# is online!"

How to localize ActiveReport 7.0 XML PageReports rdlx

We have a huge number of Page Reports created using ActiveReport (*.rdlx files)
We use them from our ASP.NET MVC web appolication.
All captions and other stuff were initially created on English
Now we need to add a multilanguage support there so, somehow we need all existing texts be inserted in resource file and so we can then add translations
Is there a way to achive this task quickly, without going to each report field and manually extracting it into resource file?
Documentation says that once you change Language property, resource files will be created, but seems it is not working for XML reports, or there shouldbe a trick
For the reports designed with Code-behind, resource files are created pretty much the same as if you will create a Windows form... but I fail to find out how to do this for XML reports.
Page Reports support a localization; however it doesn't do so with a resource file.
This is mentioned off-hand in a single sentence on the page about Localization with ActiveReports 7.
Setting up a localized value in a Page Report is done the same was as you do in a Section Report. Simply change the report's Language property and then set new textbox values. At report runtime the appropriate value for the textbox will get used.
As I mentioned above, this doesn't generate a separate .resx file; instead if you inspect the resulting .rdlx you'll find a custom dd:LocalizationResources element is created that specifies the language setting and the new values for report elements.
The Localize property you are referring to in the documentation and in the code-behind reports are for the code-based "Section Layout" Reports but won't work for XML-based "Page Layout" reports (if you look at the generated code for the report, you'll see that the designer is just generating a bunch of code to localize the report).
Since code-behind reports support custom code or you can add references to another DLL you can write a simple function to localize captions. There is a good example of localizing this for .rdl reports here, you can use exactly the same approach with the ActiveReports' .rdlx files.
During that initial configuration of the report to be localizable you'll either have to manually change each static string to a Code.LocalizedValue call or maybe you could write a simple script to find each //Textbox/Value elements and replace it with a similar call. A simple script with a combination of xpath and regex could do help you automate the initial configuration of the report. To localize something other than a Textbox Value in the report (e.g. report parameter, labels/bookmarks), you'll need to replace the text of a different element than the Textbox Value but the concept is the same.
Of course, I am assuming you are localizing the static strings in your report. If you want to localize the values from the database then you'll have to do that differently (comment if you need help and I'll explain).

Windows 8 Localizations in app manifest

I need to localize some data in application manifest (like name, description, splashscreen images etc.) According to documentation these data can be provided as resources but I don't know how to do this.
Add a localized resource (e.g. Strings/en/Resources.resw) with key "Appname" and value "My App Title"
Add a second localized resource (e.g. Strings/de/Resources.resw) with key "Appname" and value "My German App Title"
Edit you "App Manifest" and enter "ms-resource:Appname" in the "Display name" field (Application UI)
Edit you "App Manifest" and enter "ms-resource:Appname" in the "Package display name" field (Packaging)
Note: Before you do all that, you should register the app name in the Windows Store Dashboard.
In short, you follow a naming convention in your folder hierarchy. Here's a link that explains how to name properly. There is another helpful "how to" article here and two quickstarts to walk you through it in Javascript and XAML.
Specifically, look through the quickstarts (using the above links) for the step-by-step walkthrough. It is slightly different in JavaScript vs. XAML, but the overall steps are:
Set your default language in the Visual Studio project properties.
Create a folder in your project to hold all of the different resource files (one for each language). This will keep your project neat and organized.
Right-click on this folder and select "Add New Item" to add a resource file for a language. This file may be a .resx, .resw, .resjson - see the quickstarts for the specifics, based on what language you are coding in.
Add the items that you want to translate in your resources file. Again, see the quickstarts for specifics.
Associate your controls with resources and add string resource identifiers to your code.
Let me know if the quickstarts don't help.

Dynamic localization files blackberry

Here's the scenario I have. I'm working on a multi-lang application but the available languages are dynamic and returned by an API from the server. After selecting a language I should download the localization file that contains the key/value pairs to use it in my application.
My question is, does the BlackBerry localization system allow such behavior? I mean can the key/value localization files be added to the application dynamically or they have to be bundled in my COD?
If that scenario doesn't work, I would appreciate suggestions on how to do this.
The default resource files used to localize an application must be bundled with the application.
Instead you could use Locale.getDefaultForSystem() to return the current locale in use and based on that load the correct language from your remote source.

Resources