From 28a918e580d00762daead45becb5b1b86a1c4d7b Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Wed, 21 Sep 2005 03:52:30 +0000 Subject: [PATCH] r389: Added language registry populator --- docs/lang_registry_populator.php | 76 ++++++++++++++++++++++++++++++++ 1 file changed, 76 insertions(+) create mode 100755 docs/lang_registry_populator.php diff --git a/docs/lang_registry_populator.php b/docs/lang_registry_populator.php new file mode 100755 index 0000000..4e1b5ed --- /dev/null +++ b/docs/lang_registry_populator.php @@ -0,0 +1,76 @@ + $files) + { + foreach ($files AS $file) + { + if (preg_match('#\.php$#', $file)) + { + $flatlist[] = "./$basepath$file"; + } + } + } + return $flatlist; +} + +// ################################################################### +// ################################################################### + +$listing = fetch_flat_listing(fetch_listing(getcwd())); + +foreach ($listing AS $filename) +{ + $file = file_get_contents($filename); + + preg_match_all("#lang::r\('(.*?)'\)#", $file, $matches); + foreach ($matches[0] AS $matchid => $match) + { + lang::r($matches[1]["$matchid"]); + } +} + +?> \ No newline at end of file -- 2.43.5