Under src/sample you will find a Xamarin forms sample and a UWP sample. In the xamarin sample you will see how you can implement multilingual support for Xamarin and how to access the translation from code and in xaml. This is a standard implementation of multilangual suport. If you install the extension you can test the translation features of the extension.
The Visual studio for Mac team has closed the signup for new developers to publish extensions. So you need to download the latest release from this page then go to visual studio mac and click "install from file" in the Exstension Mananger. Remember to restart you visual studio after install for the extension to load.
Latest release
Go to Extension Manager and search for Multilingual Extension or Walltec and you will find it or use the link below.
Multilingual extension
You need to include a resx or resw file for each culture you wish to support. Resx files are added to the project in the same location as the master resx file, and must follow a strict naming convention.
The name of the resx file needs to include both the country code and language, for example:
A list of culture codes https://docs.microsoft.com/en-us/previous-versions/commerce-server/ee825488(v=cs.20)?redirectedfrom=MSDN
For resw files you use the folder structure to specify the languages. for example:
Strings\fr-FR\Resources.resw for French (in France)
Strings\fr-CA\Resources.resw for French (in Canada)
Remember to set your master language in the autogenerated MultiLingualExtensionSettings.json file in you psolution folder to you preferd master language for example en-US.
You can change settings for the plugin in the MultiLingualExtensionSettings.json file located in the root of the solution folder. This file will be created the first time you run any function in the extension if it does not already exist.
Master language that is 'en-US' by default. This is the language code for the MasterFile and is used in the trnaslation service to specify the input language to be translated.
1 = Googele (Default)
2 = Microsoft translation service
Google's translation. This is limited to only 100 translations per hour. To use the Microsoft translation service you need fill in the information from Microsoft in the fields (TranslationServiceMsoftEndpoint,TranslationServiceMsoftLocation,TranslationServiceMsoftKey).
your preferred export format, csv or xslt.
1 = Csv
2 = Excel (Default)
If you also want to handle the status for the texts in the master resx file then sett this to true. This will add Comment node to master Resx file on sync and also export the master Resx on export.
If you want to convert your resx files to Native android translation files, you specify here where you want them to be saved. default is that they are saved in a directory under the same as the master resx file.
If you want to convert your resx files to Native Ios translation files, you specify here where you want them to be saved. default is that they are saved in a directory under the same as the master resx file.
There are two ways to sync the language files. Right-click the master file and select "Sync all .xx-x.resx files with this". Then all files that are in the same folder and follow the naming standard .xx-xx.resx will be synchronized with the master file.
Right-click one of the language files (AppResources.fr-FR.resx) and select "Sync this .xx-x.resx file". This file will then be synchronized with the master file.
the synchronization will not only add translations to the language files it will also remove translation that are not present in the master file.
Go to View/other Windows/Multilingual Extension Log
There are two ways to translate the resx files.
Right-click the master file and select "Translate all .xx-x.resx files".
Then all files that are in the same folder and follow the naming standard .xx-xx.resx will be Translated. The extension will only translate values that has comment value set to "New".
Right-click one of the language files (AppResources.fr-FR.resx) and select "Translate this .xx-x.resx file".
This file will then be Translate with the master file. The extension will only translate values that has comment value set to "New".
In case you want to use this to have a master language file for native Android and Ios. do you need to use .resx files. To get the translation to land in your native projects, set the path to these in MultiLingualExtensionSettings.json and the property AndroidResourcesOutPutFolder and IosResourcesOutPutFolder.
There are two ways to export the resx files to csv or xlsx. Right-click the master file and select "Export all .xx-xx.resx files". Then all files that are in the same folder and follow the naming standard .xx-xx.resx will be processed and all rows with status 'New' or 'Need review' will be exported. You can change the preferd export file type in the settings dialog click tools/multilangual settings and select the preferd 'Export file type' and click save.
Right-click one of the language files (AppResources.fr-FR.resx) and select "Export this .xx-x.resx file". Then all rows with status 'New' or 'Need review' will be exported to the csv file.
Right-click one of the csv or xlsx language files (AppResources.fr-FR.resx.csv) and select "Import translation". Then all rows with status 'Final' will be imported to the resx file(AppResources.fr-FR.resx) that are in the same folder.
Right-click the master(AppResources.resx) file and select "List unused translations". The extension will search trow all .cs and .xaml files and check if the translations in the master file is used. When done it will report all translations that are not used in the app to the search result windows and prompt you with dialog asking if you want to remove all unused translations.
If you change the text in an existing node in the Master resx file and want to change the translation status. Right click somewhere on the <data name = 'xxxxx' node and select "Change Translation Status ..." and chose the status you would like to change to. This will change the status in all language files ((AppResources.fr-FR.resx) to the bew status. If you changed to 'New' then you can right click the master file and select translate to make new translations.
This feature is only iplemented on mac in current version.
If you change the text in an existing node or add a new node in the Master resx file and want to sync and translate this to all the language files. Right click somewhere on the <data name = 'xxxxx' node and select "Sync and translate this node in all .xx-xx.resx files". This will translate this node in all language files ((AppResources.fr-FR.resx) and change status to need review. This feature is only implemented on mac in current version.
This extension use the comment field in the target resx files(AppResources.fr-FR.resx) to keep track of the status of row/translation. It has three different status that it can have in it's comment field.
New: The row will get this status after first synchronization. If the data row not exist in the target file. if the translation already exists then it gets the status "final" this is so you can start using this extension if you alredy have translation files that are translated.
Need review: This status will it get after translation from one of the translation services.
Final: This status will it get after import from csv/xslt file where the status column bin changed to final. You can also set this status in the target file if you don't want the row to be exported to external stakeholder for translation.
To make a transaltion row public for all language you can add the value 'No translation' in the comment filed in the master resx file.
In this first version all files need to be in the same folder, export and import (.csv) should not be renamed if it should work when we will import translations.
if you have used the windows multilangual toolkit before you can use this. The first time you sync the master file with the target files (AppResources.fr-FR.resx) all existings rows in the target file will get status "Final". There is a Windows version of this extension also so you can work i projects where users are on both Mac and Windows.