Question about Specifying a Locale for Deployment

Sometimes it arises that we end up with a database file that is in the wrong locale. For us being in New Zealand, we use DD/MM/YYYY , but we will occasionally see a file end up MM/DD/YYYY , so has the wrong locale.

This sometimes occurs if a server is not properly set with system settings, and the file gets opened…

To remedy this historically we always did a DMT with a locale.txt file that ensures any migrated file is in the desired locale. (I have attached the file).

Looking in Otto Deploy, I note “Destination Locale” option with a list of locales, however there is only “English” as the only english specific option.

  1. Is this the same as supplying a locale.txt file for the DMT?
  2. If so, what is “English” actually providing? It could very well be US format for all I know.
  3. Is there any way to specify an exact locale.txt , or be more specific with “English” to include variations like US , British, Australia, New Zealand etc ?

I’d really love to be able to set a setting on all our deployments to ensure it is always the correct format.

{
	"APIVers" : 1,
	"Currency" : 
	{
		"Leading" : true,
		"Symbol" : "$"
	},
	"Date" : 
	{
		"DMQ" : 
		{
			"1stDayOfWeek" : 1,
			"DaysOfWeek" : 
			{
				"AbbrvList" : 
				[
					"Sun",
					"Mon",
					"Tue",
					"Wed",
					"Thu",
					"Fri",
					"Sat"
				],
				"NameList" : 
				[
					"Sunday",
					"Monday",
					"Tuesday",
					"Wednesday",
					"Thursday",
					"Friday",
					"Saturday"
				]
			},
			"Months" : 
			{
				"AbbrvList" : 
				[
					"Jan",
					"Feb",
					"Mar",
					"Apr",
					"May",
					"Jun",
					"Jul",
					"Aug",
					"Sep",
					"Oct",
					"Nov",
					"Dec"
				],
				"NameList" : 
				[
					"January",
					"February",
					"March",
					"April",
					"May",
					"June",
					"July",
					"August",
					"September",
					"October",
					"November",
					"December"
				]
			},
			"Quarters" : 
			{
				"AbbrvList" : 
				[
					"Q1",
					"Q2",
					"Q3",
					"Q4"
				],
				"NameList" : 
				[
					"1st Quarter",
					"2nd Quarter",
					"3rd Quarter",
					"4th Quarter"
				]
			}
		},
		"DMY" : 
		{
			"ElementArray" : 
			{
				"NameList" : 
				[
					"D#",
					"M$",
					"YYYY#",
					"D$"
				],
				"SepList" : 
				[
					", ",
					" ",
					" ",
					""
				]
			},
			"MustUseLocalesSep" : false
		},
		"DateNums" : 
		{
			"0d" : true,
			"0m" : true,
			"YYyy" : false
		},
		"DateOrderID" : 1,
		"DateOrderName" : "DMY",
		"Sep" : "/"
	},
	"LocaleID" : 
	{
		"IDNum" : 21,
		"IDStr" : "English",
		"ISOLangCode" : "en",
		"LID" : "English",
		"Name" : "English"
	},
	"Misc" : 
	{
		"Active" : true,
		"Metric" : true
	},
	"Num" : 
	{
		"1000s" : ",",
		"Decimal" : ".",
		"Lead0" : true
	},
	"Text" : 
	{
		"SQuotLead" : "ì",
		"SQuotTrail" : "î",
		"Sep" : ","
	},
	"Time" : 
	{
		"12h" : true,
		"HMS" : 
		{
			"0h" : false,
			"24h" : "",
			"Seconds" : false
		},
		"NightDay" : 
		{
			"12hSuffix" : true,
			"amStr" : " AM",
			"pmStr" : " PM"
		},
		"Sep" : ":"
	}
}

‘English’ is US English, not what we have in the UK
If you take the contents of the locale elements and put them in a file like en-GB.json or en-GB.txt in the Otto folder structure chown to fmserver:fmsadmin then in the dialog you can pass the file path as the parameter and it will apply it to the migration

Let me know if you need more… I have done this for several years…

For historic reasons I keep mine in /opt/Otto so you have to put the path into that box, not just the file name

So you are right, but that default list comes from Claris in the DMT and not Otto

2 Likes

Thanks @john_r for this solution :+1: I’m hoping @kduval might be able to put this option into the UI somewhere , as it would be nice to be able to store the locale with the deployment

1 Like

Well if you add the file as the locale, is that not saved with the migration that is stored??

Hey @weetbicks ,

You can type the path to your locale file into the locale field in OttoDeploy. Check out this thread for where we discussed this originally.

-Kyle

1 Like

thanks @kduval !

I’m still a little confused. so I’ve put my locale file in via the File Browser at:

OttoFMS Config/locales/EN-NZ.txt

The question I have is which server is this meant to be on first. Is it my development server or is it the destination client server that it should reside on ?

Second, in the file options → Destination Locale, what is the format of the path that is needed, and what is considered the root folder ? If I wanted to specify the path I have above what would it look like? It’s not clear that a path can even be entered into this field, but I’m assuming this is the correct one to put the path in?

Thanks.

The locale path is passed directly to the DMT when. the migration is run, so it only needs to be on the server where migrations are happening (the destination server).

For the format, I believe the DMT takes in an absolute path. so if you’re running Linux the file path you gave should be: /opt/OttoFMS/config/locales/EN-NZ.txt. You are correct that it is that field that you enter the path in. You should be able to just type there. I’ll add some documentation (and possibly a lil help icon with information) about this.

-Kyle

1 Like

Thanks, what might the path need to be on Windows ?

C:\Program Files\OttoFMS\config\locales\EN-NZ.txt

I suspect it will work with either forward or back slashes. report back if that works or not, I haven’t tried doing the full path on windows before I don’t think.

-Kyle

Fresh new documentation. There’s also a reference for the file paths in the docs now.

-Kyle

2 Likes

@kduval
you need to add to that docs that English is actually us-english and if you want a different flavour of English you will need to create a locale text file

and that the contents of that file you get from Get ( SystemLocaleElements )

Done! thanks for the feedback

I’m not entirely sure what I’ve done wrong. The path shown is in the destination locale field, and the file is definitely in the folder. Does it require certain permissions? have I not named it correctly perhaps, do locales require a specific filename convention?

try en-NZ, and it needs to be fmserver:fmsadmin

not much help in the help
https://help.claris.com/en/data-migration-tool-guide/content/migrate-data.html

I’m not sure whether it was the file rename, or permissions, but making both changes fixed the issue thanks :slight_smile:

1 Like