Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

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 filesfile, generated by Sisulizer (translation resx file).

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

...

Create Language Variant in Sisulizer

A language variant is a custom language other than already existing .NET languages like 'en' or 'en-US'. A language variant is always created from a country specific language like 'en-US' - something like 'en-US-Disney'. No language variant can be created from 'en' only.

  • 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 ENen-US. You can't select just EN'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
    • Continue with steps in 'Add Language to Core'

Add Language to Sisulizer and Core

To add a language (i.e. en-US, fr-CA) or language variant follow the steps below.

  • Open Sisulizer project file /src/MarineLMS - Sisulizer Translation.slp
  • Open drop down list for languages in tool bar and select Add...
  • Image Modified
  • Select any language and add to from the list in 'Available languages' and move it to the list of 'Selected Languages' (via blue arrow button)
    • 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
    • Image Modified 
  • Select OK to complete adding a new language
  • Image Modified
  • Export translation resx files into checked out solution/projectfor the added language into VS solution via Project → Build in Selected Language → ..\src\MarineLMS.sln
  • Manually add all new translation resx files to the VS solution /projectSet by including the generated translation resx files into the VS solution (right click on resx file and select 'Include in Project')
    • Always set the Custom Tool = PublicResXFileCodeGenerator and Custom Tool Namespace for each translation resx file to match the
    original neutral
    • default resx
    files.
    • file
  • Check in Add the new translation resx files to Git
  • Check in/update the Sisulizer configuration file ('MarineLMS - Sisulizer Translation.slp' and 'MarineLMS - Sisulizer Translation.sds') to into Git
    • Note: the 'MarineLMS - Sisulizer Translation.sds' file is updated once Sisulizer is closed

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 translation resx files
  7. Save the Sisulizer project
  8. Open MarineLMS solution in Visual Studio
    1. Include newly created custom language specific translation 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 to find resx files which are not yet added to the solution)
    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 the translation resx file AssessmentSummaryRx.en-US-Disney.resx, there is always a default resx file AssessmentSummaryRx.resx.
  9. Commit all resx files and the Sisulizer project file files /src/MarineLMS - Sisulizer Translation.slp and /src/MarineLMS - Sisulizer Translation.sds (note: the sds file is updated once Sisulizer is closed)

Support Language Specific Date/Time Formats

...

data-date-language: The date language must be the 2 letter language name like en, fr,... The language name like 'fr' is deferred from the js script like 'bootstrap-datepicker.fr.min.js'.

Notes

Task 

Jira Legacy
serverSystem JIRA
columnskey,summary,type,created,updated,due,assignee,reporter,priority,status,resolution
serverId23f523ea-1678-3ca2-a1e8-2de53fd3b74a
keyCOREDEV-3930
 will change the DatePicker behaviour to truly use either local or UTC DateTime objects. However, the DateTime format for internationalization would still be required for UI purposes.

Handling Resx Files in Visual Studio

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

...

Web project is currently maintained for resx file translations with Sisulizer. Resx files in any other VS project is ignored as of now.

In general, you only need to worry about the English (default) resx files in the VS solution. All other language specific resx files (translations) are maintained by the Sisulizer tool. There are a few exceptions when adding new/removing resx files (see below for more details).

Don't change/update any names/values within a translation resx file. Changes to translation resx files will be ignored and overwritten by Sisulizer. Any update to a translation must be done in Sisulizer to take effect. Having said that, changes to default resx files must be done in VS solution to take effect because Sisulizer will read the uses all default resx file files as ' truth'

Information Flow Between VS Solution and Sisulizer with Respect to Resx Files

Default resx filefiles: VS solution is the authoritative truth and changes flow from made to those files in VS solution are adopted into Sisulizer

Translation resx files: Sisulizer is the authoritative truth and changes flow from Sisulizer → made in Sisulizer are pushed into VS solution

Add new Resx File

If you need to add a new resx file, add the default resx file only (i.e. AssessmentSelectorControllerRx.resx). Any translation resx files and their names/values are handled/created by Sisulizer (i.e. AssessmentSelectorControllerRx.fr-CA.resx and AssessmentSelectorControllerRx.en-US-Disney.resx).

Note: if Sisulizer is generating the translation resx files for the first time those files need to be manually added to the VS solution

Edit Existing Resx Name/Value

...