loc-to-region
v0.1.1
Published
A module for matching case sensitive associative arrays
Downloads
1
Readme
To use the localization method, first create a folder called /locale/ in the root of your project, and inside that folder name each sub-folder after a locale. Create one .properties file in each folder and include in the router like this:
To install in a project, run this command:
npm install @haven/loc-to-region --save
Then put the code in your express router like this:
var loc_region = require('@haven/loc-to-region');
var gtm_locale = loc_region.localeReplace(regions,req.params.locale);
Express is not required.
Thanks for using!
-Daniel @ Haven
``````````````````````````````````````````````````````````````````````````````````````````````````````````````````
`` ``
` `
` `
`` ``
`` ``
`` ``
`` ``
`` ``
`` ````` ``
`` . ```````..`` ``
`` .`:` `````.....```,,`` ``
`` .,::'';::,:;;;:,...,++;;:` ``
`` `,;;;'';;'+++++++++++++''::` ``
`` ```.:;''''''+++++++#####+++'':,.` `` ``
`` `..`,;++'''''+++++++######++''':,.``. ``
`` ,`,.,'+++'++++++##+########+++'';;,,;` ``
`` :.,:;'+++++++++##++###########+++++';. ``
`` `;;:;'++++++++++##++#############+++';.` ``
`` .';;'++++''++'++##++#########+##+++++',. ``` ``
`` .;;;'++++'''''++++++#####+++++++++++++;.`.::` ``
`` ``.,;'+++++++'++++'+++#+++''''+++''++++';;:::. ``
`` .``.'+##++++'++;''+++++++';''+++++++++'+++';:, ``
`` ,..,'#####++++++++++++++';;+++++++++++'+++';;;, ``
`` `:::;'+#####+++++++++++';;,'++++++##++;+#+++;;;:` ``
`` `;'++++#####+++++++++++;:,,;'+++++##+''+#++++';,` ``
`` `.;++++#########+++++';,...,'+++++##+++''+++++':. ``
`` .:'++++#########+++'';,..``.'++'''###++''+##+++'. ``
`` `:;'++'+#########++';;:``.``.;';;;;+###########';. ``
`` .:;;;'++########++';;:. ` .,;:,::;++####+###+':.` ``
`` `.:'++########++';;;:.` ` `,;,,,,:'++##++##++':. ``
`` `.;+#########++';;;:,````````:;:;;;;'++++++#++'';, ``
`` .:'+#########++';;''';:,.```.::;;'''';'++####++'': ``
`` ,;'+#########++';;''+'';,....,:;''';::;'+#####++';`` ``
`` `;'+###@#####+';:,,,:'';;,```.;;:,..,::;'+#####+'';. ``
`` .;'++##@####+';::,,,,:;;;,` .,:;+#';:,,:'#####++++,` ``
`` `:;'+####@@#+';:::;'++,,,..````.,.,,,::...:+####++++:. ``
`` .;'+#####@@#':,,,:;:,..``..````.........`.,'####++++:,` ``
`` `:'+#########;,..`......``...```.`````````.,;#####++;:,` ``
`` `:'+######+#+:,..`````````...```.```````...,;#####+'';. ``
`` :'+########+:,....``````....```````````....;#####++';` ``
`` ,;+########+:,.....`````...`` ```.`````...,;#####++':` ``
`` `;'########+;:.....````.....` ``....``....,;#####++'. ``
`` `;'########+;:,,,..````.,,,,,..,::,.......,;#####+': ``
`` :;+#####+++':,,,...`.`.'+++'''''',``....,,;+####';, ``
`` `'+######+++;:,,....```:;;'+++';:.```...,,;'###+':` ``
`` ,'+#####';+;::,,..````,,,,;';,,,...``.,,,;'##+':. ``
`` ,+#####;:+;::,,...``.,,,,...,,,....`.,,,'##+;,` ``
`` `'+##@@+;+';:,,......,,:;;,:::::,.....,:'#+,` ``
`` .'##@@###+;:,,..,,,:::::;;;;;;;':,...,:'++ ``
`` `:+#@@@@@+;:,...,:+++';::;,...'+;,...,:++: ``
`` `.:+#@@@@#;:,....:,;',,`````.,;,.....,;+;` ``
`` `.,:;###@#';:,.....,::::. `.:::......:'+: ``
`` `,,;####@@+;:,.....,,:::,,.,,,,.....,:'+, ``
`` .,:#####@@#';:,.....,:::...,,,.....,:;++; ``
`` .,;+####@@##';:.....,,,,,,,,,,.....,;'+'.` ``` ``
`` `,:'+#####@@#+';:,,...,,,,,,,,.....,:'++,.` .``` ``
`` .,;'+#@###@@##+';:,...,,,,,,,,.....,;+++',. ,...` ``
`` .:''+#@@##@@###+';,,...............:+##++;,` `:... ``
`` `.:'''######@####+':,...............;+##',,,.` :.... ``
`` `,;'''+#+++########':,...........,,,'+##..`.,.` .,...` ``
`` .:'''''++''+#+#####+':,,,......,,,:;'+##,.```.`` `:,.`` ``
`` `;'''''''''''+''+####+::,,,,,,,,,::;''+##',.```.```````,.`` ``
`` .'''''''''''''::;+####';:::::::::;;'''##+'',.````.`````..``` ``
`` ;''''''''''''';,:;+####+';;;;;;;;'''''#+'''',.````````...``. ``
`` ''''''''''''''',,,;+####+++++++''''''+#+''''':.` ````..,.``. ``
`` :''''''''''''''';,,,'###########++''''#+''''''':.` ``...,.``.` ``
`` `''''''''''''''''';,,,+##########++'''+#+'''''''':.` ```..:..``. ``
`` `''''''''''''''''''';,,;+#########++''+#''''''''''';,`````.,,.```` ``
`` ''''''''''''''''''''';,,+#########++++##+''''''''''';,`````...```. ``
`` ;'''''''''''''''''''''';:;+########+++###''''''''''''';,..````..``.` ``
`` +'''''''''''''''''''''''';+########++###+''''';'''''''';,.`````.```. ``
`` .''''''''''''''''''''''''''++############'''''''''''''''';..`````````` ``
`` `'''''''''''''''''''''''''''''+##########+''''''''''''''''':,.````````. ``
`` ;'''''''+++'''''''''''''''''''''+++######'''''''''''::;'''';:,.```````.` ``
`` .';;''''''''''+++++''''''''''''''''+'''++++++''''''''';:..``,:;;::,.``````.. ``
`` ''''''''''''''''++++++++'''''''''''''''''''''''''''''';,.``````,:,,,.`````.. ``
`` ''''''''''''''''''''''++##++++++''''''''''''''''''''''';:,.`````````..`````... ``
`` ```'''''''''''''''''''''''''''+########++''++++''''''''''''';;,.``````` ```````.., ``
`` `'''''''''''''''''''''''''''''''''+++######'++++++'''''''+'''''':,.``````` `````..,,` ``
`` '''''''''''''''''''''''''''''''''''''''+++++'++'''''''''++++''''':,..`````` ````.,,,`` ``
`` +'''''''''''''''''''''''''''''''''''''''''++'''''''''''''++++'''';;;,..`````````.,,,,` ``
`` '''''''''''''''''''''''''''''''''''''''''''+'''''''''''''++++++''''+';,..```````...,,` ``
`` '''''''''''''''''''''''''''''''''''''''''''+''''''''''''''++#+++,...,'':..`````....,,, ``
`` '''''''''''''''''''''';;'''''''''''''''''''''''''''''''''''+###'....``.::..```.....,,,:` ``
`` '''''''''''''''''''''';;''''''''''''''''''''+''''''''''''''+###'....````....`....,,,,,;` ``
`` ''''''''''''''''''''';;;''''''''''''''''''''+''''''''''''''+++#+,...````````....,,,,,,:: ``
`` '''''''''''''''''''''';;''''''''''''''''''''+''''''''''''''+':,:':,..```````...,,,,,,,:;` ``
`` '''''''''''''''''''''';;''''''''''''''''''''+''''''''''''''` `.:':,.....``...,,,,,,,,,;` ``
`` '''''''''''''';;''''''';'''''''''''''''''''''''''''''''''', ```,;'';,...........,,,,,,,:,` ``
`` '''''''''''''''''''''''''''''''''''''''''''''''''''''''''',``.#:''+'':,..,,,,....,,,,,,,;` ``
`` '''''''''''''''''''''''''''''''''''''''''''''+'''':.`` :'; .:'''+++++;:,,,,,.....,,,,,,,,` ``
`` '''''''''''''''''''''''''''''''''''''''''''':,' .; `.',`.:;''++++#';:,,,,,....,,,,,,.. ``
`` ``
`` ;'''''` ,'''` '''; '''' ;''' `''''''': ;''' `''', ''''''';` `''''''': ``
`` .'''''''` ,'''` '''; '''' ;''' `'''''''''; ;''' `''', '''''''''' `''''''': ``
`` ''''';''` ,'''` '''; '''' ;''' `''''''''''; ;''' `''', ''''''''''' `''''''': ``
`` '''' ` ,'''` '''; '''' ;''' `''', ;'''' ;''' `''', '''; :''''` `'''. ``
`` ''''. ,'''` '''; '''' ;''' `''', ''''. ;''' `''', '''; ;'''; `'''. ``
`` '''''', ,'''` '''; '''''''''''' `''', ,''': ;''' `''', '''; '''' `'''''''` ``
`` `''''''' ,'''` '''; '''''''''''' `''', .'''; ;''' `''', '''; '''' `'''''''` ``
`` ;'''''; ,'''` '''; '''''''''''' `''', :''': ;''' `''', '''; `'''; `'''''''` ``
`` :'''' .''', `''': '''' ;''' `''', ''''` :'''` ,'''. '''; ;''', `'''. ``
`` ; '''' ''''` ''''` '''' ;''' `''', `''''' .'''' `'''' '''; ;'''' `'''. ``
`` ''''''''; '''''''''' '''' ;''' `''''''''''` '''''''''' '''''''''', `'''''''' ``
`` '''''''' ''''''''` '''' ;''' `'''''''''` `'''''''' ''''''''', `'''''''' ``
`` :''''': :''''; '''' ;''' `'''''';. ;'''': '''''';, `'''''''' ``
`` ``
`` ``
`` ``
`` ``
`` ``
`` ``
` `
` `
``` ```
````````````````````````````````````````````````````````````````````````````````````````````````````````````````