[sword-svn] r2199 - trunk/utilities
chrislit at www.crosswire.org
chrislit at www.crosswire.org
Sat Sep 13 19:02:33 MST 2008
Author: chrislit
Date: 2008-09-13 19:02:33 -0700 (Sat, 13 Sep 2008)
New Revision: 2199
Modified:
trunk/utilities/vs2osisref.cpp
Log:
added locale support (to allow parsing of non-English verse refs)
Modified: trunk/utilities/vs2osisref.cpp
===================================================================
--- trunk/utilities/vs2osisref.cpp 2008-09-11 20:59:30 UTC (rev 2198)
+++ trunk/utilities/vs2osisref.cpp 2008-09-14 02:02:33 UTC (rev 2199)
@@ -1,5 +1,6 @@
#include <iostream>
#include <versekey.h>
+#include <localemgr.h>
#ifndef NO_SWORD_NAMESPACE
using namespace sword;
@@ -13,10 +14,17 @@
{
if (argc < 2) {
cerr << argv[0] << " - parse verse reference to OSISRef markup\n";
- cerr << "usage: "<< argv[0] << " <verse_ref> [verse_context]\n";
+ cerr << "usage: "<< argv[0] << " <verse ref> [verse context] [locale]\n";
cerr << "\n\n";
exit(-1);
}
+
+ char * locale;
+
+ if (argc > 3) {
+ LocaleMgr::getSystemLocaleMgr()->setDefaultLocaleName(argv[3]);
+ }
+
VerseKey verseKey = (argc > 2) ? argv[2] : "Gen 1:1";
std::cout << VerseKey::convertToOSIS(argv[1], &verseKey) << "\n";
More information about the sword-cvs
mailing list