Skip to end of banner
Go to start of banner

Custom Language/Internationalization in Core

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current Restore this Version View Version History

« Previous Version 6 Next »


Disney language:
- .net language must be installed on machine which builds the solution - if not - it doesn't generate the satellite localization dlls.
Even though the resx files are included into the main dll, the app (web) doesn't access them.
- Create dll which just does the language registration so we can use a powershell script to execute on build (build action).
Check in the custom culture generator dll to 'lib'
Visual Studio - restart to let VS update the .NET language list (especially removing a language)


Sisulizer Tool

We have one license of the software (currently installed on Stefan-PC). It creates translations (resx files) for Visual Studio solutions. Every custom language (i.e. en-US-Disney) needs it's extra set of resource files, generated by Sisulizer.

Install Sisulizer Tool

Either download the tool from https://www.sisulizer.com (Professional Developer version) or get it from network share \\mlsnas\Public\Software\Sisulizer Tool

License key can be found in https://docs.google.com/spreadsheets/d/1eOP-rSso_CzctFzv29Hp-Lw5EIalz72Ym6EE3lEzQzA/edit#gid=711274036

Add New Custom Language to Core

  • Open Sisulizer project file /src/MarineLMS - Sisulizer Translation.slp
  • Add a new language variant (Tools → General... → Languages)
    • Select a specific language you want to create a variant for and click 'Add variant...'.
      • Important: you must select a country specific language like EN-US. You can't select just EN.
    • Tab Codes: add name for the ISO variant (i.e. Disney). Don't change the Windows code (which is autom. updated if the ISO variant name is added)
    • Tab Names: add the same variant names in both text fields as ISO variant (i.e. Disney)
    • The resulting custom language will be like EN-US-Disney
  • Add new custom language to the slp project
    • Open drop down list for languages in tool bar and select Add...
    • Select language and add to 'Selected Languages'
      • If you add a country specific language (i.e. FR-CA) and the general language (i.e. FR) is not added a warning is issued. Select No
      •  
    • Select OK to complete adding a new language
  • Export resx files into checked out solution/project
  • Manually add all resx files to the VS solution/project
  • Set the Custom Tool = PublicResXFileCodeGenerator and Custom Tool Namespace for each resx file to match the original neutral resx files.
  • Check in the new resx files to Git
  • Check in/update the Sisulizer configuration file ('MarineLMS - Sisulizer Translation.slp') to Git

Update Resx Files and/or Make Translations

  1. Open Sisulizer project file /src/MarineLMS - Sisulizer Translation.slp
  2. Project → Scan for Changes 
  3. Select All to view all text which can be translated.
  4. Ctrl + F5 to search for any term you need to translate
  5. Make any translation/changes you need
  6. Project → Build in Selected Language will generate the updated/new resx files
  7. Save the Sisulizer project
  8. Open MarineLMS solution in Visual Studio
    1. Include newly created custom language specific resx files (created by Sisulizer) to MarineLMS solution
      1. The easiest way to find any new resx files created by Sisulizer is to check Sourcetree for uncommitted changes/unstaged files
      2. In VS, right click resx file and select Include in Project (enable Show All Files in the Solution Explorer)
    2. Update the newly added resx file's properties (2) to match the values of the counterpart's resx file (= default language resx file)
      1. Custom Tool: PublicResXFileCodeGenerator
      2. Custom Tool Namespace: [[namespace from corresponding default resx file]]
    3. Example: if you added AssessmentSummaryRx.en-US-Disney.resx, there is always a resx file AssessmentSummaryRx.resx.
  9. Commit all resx files and the Sisulizer project file /src/MarineLMS - Sisulizer Translation.slp and /src/MarineLMS - Sisulizer Translation.sds


Notes

Only Core web projects currently contain resx files and therefore only Core web projects are imported into Sisulizer.

Trips and Pitfalls



Filter by label

There are no items with the selected labels at this time.