I am looking for some tools/frameworks for .NET Core 3.1 to ease the localization of my web app. I wanna avoid dealing with .resx files as much as possible. Westwind.Globalization is a good one but it does not support version .NET Core 3.1. Is there anything similar to that or any other solutions?
Searched the internet a lot. Could not find any.
If you use ASP.NET Core it has this new IStringLocalizer/IViewLocalizer concept. You no longer have to create .resx file but you just inject the localizer interface and then use the interface to translate you markup and code.
<p>This is a sample</p>
becomes
<p>#localizer["This is a sample"]</p>
You can use the localizer in source code too.
To localize you still have to create the localized .resx file that is a plain. Fortunately there are tools that can do if for you.
When using Soluling, you just select .csproj file. Then Soluling scans your code (.cshtml and .cs files) to find intances where localizer has been used. Soluling extract the strings and shows you (or your translator) a user interface to translate them. Finally it creates the localized .resx files. You compile your project and it is multilingual.
Read more from here.
Related
I have an Asp MVC app that was developed with no I18N in mind. Now I need to move all hardcoded strings from Razor views and from C# code to a resource file.
I thought I can use ReShaper to help me with that as described here:
https://www.jetbrains.com/resharper/features/internationalization.html#Move_Strings_to_Resource_Files
However, it doesn't highlight/underline hardcoded strings in any of my project files (views, classes, ...).
Do I need to enable this somehow? I'm running VS2015 + ReSharper9
You need to create a resource file in your project before any features show up. Go to the project properties, select the resources tab, and click on the link to create a file.
I have two environments that use Umbraco: Live and Dev.
As I have in research, Umbraco will be create a physical file when a user creates a new partial view, macro, etc. so, I have two questions:
1. What is the best way to know which files were created on Live and how to migrate them to Dev environment for the purpose of creating new features?
I have tried to Google and found "Hybrid Framework" but it is not up to date and I want to maintain code by myself.
2. I want to extend Umbraco with my own code. What is the best practice for this? (I do not want to change any code in the original Umbraco Source, just create my own new code)
As I know, I can create a package for extending code but I just want to know the other ways.
Partial Views, Macros , Templates are .cshtml files, these will not affect your source code. Same is case with css and js files; these will not harm any source code.
Just copy paste these files in respective folders and reload the nodes in backend. It will work properly.
Other way is you can create a package zip file from developer section where you can export datatypes, content and files, and install it in other environment.
This is the TaskyPro solution, available here: https://github.com/xamarin/mobile-samples/tree/master/TaskyPro/
If you look at the solution structure on GitHub it doesn't have anything odd about it, but when I load the solution in Visual Studio it appears as follows:
The Tasky.Android project contains the same folders as the Tasky.Core project, and it appears to have links to the files in Tasky.Core. However, when I view the folders in Windows Explorer they are empty. If I view the properties of the links, the Full Path property points to the actual file stored in the Tasky.Core project.
Why are these links here? Can I remove them?
File linking is a way to share the same files across multiple projects without having to maintain multiple copies of each file by hand. In this case, it allows you to compile the same source files for both .NET and Android. Xamarin has a lot of documentation on this, including this article which describes how Tasky is architected and implemented. I also recommend reading this guide on Sharing Code Options.
We have a multilingual site that is currently using 2 languages, but with several others coming soon. The site is localized primarily by resx files, but with some localized data in a database.
We need to find some tools to manage localization of the site - something that picks up on changes in resx files so translators will only need to translate new or updated texts.
Any ideas or recommendations? We're also interested in any articles about the logistics of localization if anyone has some.
I'm researching this area as we speak and I came across your post. I'm not sure if this is any help but in the past we used RCWinTrans for our localization. This was for mutiple C++/MFC products although it does support .Net . We would have a RCWinTrans project for each language/product we intended to support although you could have multiple languages in a single project. It kept track of state (i.e. not-translated, translated, changed, etc) and would allow us to export the strings to an excel spreadsheet which we could then send onto a translator. They would updated the spreadsheet and we would reimport the data.
Hope this helps, apologies if I'm on the wrong track and I'm teaching grandma to suck egss. I will be creating another thread today with a similar requirement to this btw, but with a few more snagettes - might be worth a look to see if I get any answers. Cheers, Roger
An idea might be to have all the localization data the database (or a localization database), this way one could build the localization tools/interface as part of the application and poyentially use it for many applications?
There is a free tool called Resource Translation Helper ( http://www.winking.be/resource-translation-helper )
Install it
Point it to your project directory
Export to excel (.xls)
Give the excel to your translaters and let them update the columns.
Import the updated xls file again
The tool creates also a file to map the resx translation to the excel rows. Don't remove that or you will not be able to import again.
Works very good, but backup your data before adjusting things ;-)
You cant try to use this Visual Studio extension https://visualstudiogallery.msdn.microsoft.com/2676967b-0516-4f5f-b312-6873e2f9d219.
It allows to export/import your project resources to/from excel and to add new cultures.
Old question, but I would like to add http://www.zeta-resource-editor.com/index.html
Free tool for .NET resource files.
This directly edits the resource files, no need to ex-/import.
I'm new to developing in OpenLaszlo, and have tried Eclipse (hoping for decent code completion), but found it far too heavy for my tastes. fell back to using Textmate, but the bundle for OpenLaszlo is terribly out of date.
Any suggestions? or should I just roll up my sleeves and write a new bundle for Textmate?
I personally use SpketIDE as an Eclipse plugin. It has some code completion, good syntax highlighting.
I use VIM for this. The VIM mode that ships with OpenLaszlo recognizes both the XML tags and the embedded JavaScript. Of course, if you're not already a VIM user, it's a big project to dive in.
If you use a texteditor or XML editor with support for XSD schema, you can generate a custom XSD file of your application using this OpenLaszlo Schema Generator tool. The tool uses Ant to generate the schema file, which then can be used by the editor of your choice.
We used Visual Studio. And we used it just as a great XML editor.
I also used Notepad2 because it is very lightweight and has syntax highlighting.
I've been using Notepad++ with the XML language chosen (since Open Laszlo is basically just XML and javascript). Simple, but effective and free.
I wouldn't have added it otherwise, but since its arch-enemy VI(m) was mentioned:
Emacs
is worth listing. :)
Without knowing much about OL, I am pretty sure one of gazillions of modes it has provides some level of support for your editing needs.
I've been developing in OpenLaszlo since 2006. I currently use NotePad++ with .lzx files set to be interpreted as XML files, this allows the code to be highlighted well in different colours for the different parts that make up OpenLaszlo code (XML nodes, JavaScript/AS3, etc.).
You can find NotePad++ at:
http://notepad-plus-plus.org/
it is free.
I just test my application by loading it into a web browser page.