Google Language Translator - Version 5.0.03

Version Description

Download this release

Release Info

Developer rm2773
Plugin Icon wp plugin Google Language Translator
Version 5.0.03
Comparing to
See all releases

Code changes from version 5.0.02 to 5.0.03

css/style.css CHANGED
@@ -275,6 +275,11 @@ code {
275
  background:url('../images/flags22.png') -146px -32px no-repeat;
276
  }
277
 
 
 
 
 
 
278
  #flags.size22 a[title="Chinese"],
279
  .tool-container .tool-items a[title="Chinese"] {
280
  background:url('../images/flags22.png') -1px -61px no-repeat;
@@ -425,6 +430,11 @@ code {
425
  background:url('../images/flags22.png') -146px -177px no-repeat;
426
  }
427
 
 
 
 
 
 
428
  #flags.size22 a[title="Khmer"],
429
  .tool-container .tool-items a[title="Khmer"] {
430
  background:url('../images/flags22.png') -1px -206px no-repeat;
@@ -460,11 +470,21 @@ code {
460
  background:url('../images/flags22.png') -1px -235px no-repeat;
461
  }
462
 
 
 
 
 
 
463
  #flags.size22 a[title="Malay"],
464
  .tool-container .tool-items a[title="Malay"] {
465
  background:url('../images/flags22.png') -30px -235px no-repeat;
466
  }
467
 
 
 
 
 
 
468
  #flags.size22 a[title="Maltese"],
469
  .tool-container .tool-items a[title="Maltese"] {
470
  background:url('../images/flags22.png') -59px -235px no-repeat;
@@ -485,6 +505,11 @@ code {
485
  background:url('../images/flags22.png') -146px -235px no-repeat;
486
  }
487
 
 
 
 
 
 
488
  #flags.size22 a[title="Nepali"],
489
  .tool-container .tool-items a[title="Nepali"] {
490
  background:url('../images/flags22.png') -1px -264px no-repeat;
@@ -530,6 +555,16 @@ code {
530
  background:url('../images/flags22.png') -59px -293px no-repeat;
531
  }
532
 
 
 
 
 
 
 
 
 
 
 
533
  #flags.size22 a[title="Slovak"],
534
  .tool-container .tool-items a[title="Slovak"] {
535
  background:url('../images/flags22.png') -88px -293px no-repeat;
@@ -550,6 +585,11 @@ code {
550
  background:url('../images/flags22.png') -1px -322px no-repeat;
551
  }
552
 
 
 
 
 
 
553
  #flags.size22 a[title="Swahili"],
554
  .tool-container .tool-items a[title="Swahili"] {
555
  background:url('../images/flags22.png') -30px -322px no-repeat;
@@ -560,6 +600,11 @@ code {
560
  background:url('../images/flags22.png') -59px -322px no-repeat;
561
  }
562
 
 
 
 
 
 
563
  #flags.size22 a[title="Tamil"],
564
  .tool-container .tool-items a[title="Tamil"] {
565
  background:url('../images/flags22.png') -88px -322px no-repeat;
@@ -585,6 +630,11 @@ code {
585
  background:url('../images/flags22.png') -59px -351px no-repeat;
586
  }
587
 
 
 
 
 
 
588
  #flags.size22 a[title="English"],
589
  .tool-container .tool-items a[title="English"] {
590
  background:url('../images/flags22.png') -88px -351px no-repeat;
@@ -682,6 +732,11 @@ code {
682
  background:url('../images/flags18.png') -147px -33px no-repeat;
683
  }
684
 
 
 
 
 
 
685
  #flags.size18 a[title="Chinese"],
686
  .tool-container .tool-items a[title="Chinese"] {
687
  background:url('../images/flags18.png') -2px -62px no-repeat;
@@ -832,6 +887,11 @@ code {
832
  background:url('../images/flags18.png') -147px -178px no-repeat;
833
  }
834
 
 
 
 
 
 
835
  #flags.size18 a[title="Khmer"],
836
  .tool-container .tool-items a[title="Khmer"] {
837
  background:url('../images/flags18.png') -2px -207px no-repeat;
@@ -867,11 +927,21 @@ code {
867
  background:url('../images/flags18.png') -2px -236px no-repeat;
868
  }
869
 
 
 
 
 
 
870
  #flags.size18 a[title="Malay"],
871
  .tool-container .tool-items a[title="Malay"] {
872
  background:url('../images/flags18.png') -31px -236px no-repeat;
873
  }
874
 
 
 
 
 
 
875
  #flags.size18 a[title="Maltese"],
876
  .tool-container .tool-items a[title="Maltese"] {
877
  background:url('../images/flags18.png') -60px -236px no-repeat;
@@ -892,6 +962,11 @@ code {
892
  background:url('../images/flags18.png') -147px -236px no-repeat;
893
  }
894
 
 
 
 
 
 
895
  #flags.size18 a[title="Nepali"],
896
  .tool-container .tool-items a[title="Nepali"] {
897
  background:url('../images/flags18.png') -2px -265px no-repeat;
@@ -937,6 +1012,16 @@ code {
937
  background:url('../images/flags18.png') -60px -294px no-repeat;
938
  }
939
 
 
 
 
 
 
 
 
 
 
 
940
  #flags.size18 a[title="Slovak"],
941
  .tool-container .tool-items a[title="Slovak"] {
942
  background:url('../images/flags18.png') -89px -294px no-repeat;
@@ -957,6 +1042,11 @@ code {
957
  background:url('../images/flags18.png') -2px -323px no-repeat;
958
  }
959
 
 
 
 
 
 
960
  #flags.size18 a[title="Swahili"],
961
  .tool-container .tool-items a[title="Swahili"] {
962
  background:url('../images/flags18.png') -31px -323px no-repeat;
@@ -967,6 +1057,11 @@ code {
967
  background:url('../images/flags18.png') -60px -323px no-repeat;
968
  }
969
 
 
 
 
 
 
970
  #flags.size18 a[title="Tamil"],
971
  .tool-container .tool-items a[title="Tamil"] {
972
  background:url('../images/flags18.png') -89px -323px no-repeat;
@@ -1002,6 +1097,11 @@ code {
1002
  background:url('../images/flags18.png') -147px -352px no-repeat;
1003
  }
1004
 
 
 
 
 
 
1005
  #flags.size18 a[title="Vietnamese"],
1006
  .tool-container .tool-items a[title="Vietnamese"] {
1007
  background:url('../images/flags18.png') -2px -381px no-repeat;
@@ -1089,6 +1189,11 @@ code {
1089
  background:url('../images/flags20.png') -147px -33px no-repeat;
1090
  }
1091
 
 
 
 
 
 
1092
  #flags.size20 a[title="Chinese"],
1093
  .tool-container .tool-items a[title="Chinese"] {
1094
  background:url('../images/flags20.png') -2px -62px no-repeat;
@@ -1239,6 +1344,11 @@ code {
1239
  background:url('../images/flags20.png') -147px -178px no-repeat;
1240
  }
1241
 
 
 
 
 
 
1242
  #flags.size20 a[title="Khmer"],
1243
  .tool-container .tool-items a[title="Khmer"] {
1244
  background:url('../images/flags20.png') -2px -207px no-repeat;
@@ -1274,6 +1384,11 @@ code {
1274
  background:url('../images/flags20.png') -2px -236px no-repeat;
1275
  }
1276
 
 
 
 
 
 
1277
  #flags.size20 a[title="Malay"],
1278
  .tool-container .tool-items a[title="Malay"] {
1279
  background:url('../images/flags20.png') -31px -236px no-repeat;
@@ -1284,6 +1399,11 @@ code {
1284
  background:url('../images/flags20.png') -60px -236px no-repeat;
1285
  }
1286
 
 
 
 
 
 
1287
  #flags.size20 a[title="Maori"],
1288
  .tool-container .tool-items a[title="Maori"] {
1289
  background:url('../images/flags20.png') -89px -236px no-repeat;
@@ -1299,6 +1419,11 @@ code {
1299
  background:url('../images/flags20.png') -147px -236px no-repeat;
1300
  }
1301
 
 
 
 
 
 
1302
  #flags.size20 a[title="Nepali"],
1303
  .tool-container .tool-items a[title="Nepali"] {
1304
  background:url('../images/flags20.png') -2px -265px no-repeat;
@@ -1344,6 +1469,16 @@ code {
1344
  background:url('../images/flags20.png') -60px -294px no-repeat;
1345
  }
1346
 
 
 
 
 
 
 
 
 
 
 
1347
  #flags.size20 a[title="Slovak"],
1348
  .tool-container .tool-items a[title="Slovak"] {
1349
  background:url('../images/flags20.png') -89px -294px no-repeat;
@@ -1364,6 +1499,11 @@ code {
1364
  background:url('../images/flags20.png') -2px -323px no-repeat;
1365
  }
1366
 
 
 
 
 
 
1367
  #flags.size20 a[title="Swahili"],
1368
  .tool-container .tool-items a[title="Swahili"] {
1369
  background:url('../images/flags20.png') -31px -323px no-repeat;
@@ -1374,6 +1514,11 @@ code {
1374
  background:url('../images/flags20.png') -60px -323px no-repeat;
1375
  }
1376
 
 
 
 
 
 
1377
  #flags.size20 a[title="Tamil"],
1378
  .tool-container .tool-items a[title="Tamil"] {
1379
  background:url('../images/flags20.png') -89px -323px no-repeat;
@@ -1409,6 +1554,11 @@ code {
1409
  background:url('../images/flags20.png') -147px -352px no-repeat;
1410
  }
1411
 
 
 
 
 
 
1412
  #flags.size20 a[title="Vietnamese"],
1413
  .tool-container .tool-items a[title="Vietnamese"] {
1414
  background:url('../images/flags20.png') -2px -381px no-repeat;
@@ -1438,407 +1588,457 @@ code {
1438
 
1439
  #flags.size16 a[title="Afrikaans"],
1440
  .tool-container .tool-items a[title="Afrikaans"] {
1441
- background:url('../images/flags16.png') -3px -5px no-repeat;
1442
  }
1443
 
1444
  #flags.size16 a[title="Albanian"],
1445
  .tool-container .tool-items a[title="Albanian"] {
1446
- background:url('../images/flags16.png') -32px -5px no-repeat;
1447
  }
1448
 
1449
  #flags.size16 a[title="Arabic"],
1450
  .tool-container .tool-items a[title="Arabic"] {
1451
- background:url('../images/flags16.png') -61px -5px no-repeat;
1452
  }
1453
 
1454
  #flags.size16 a[title="Armenian"],
1455
  .tool-container .tool-items a[title="Armenian"] {
1456
- background:url('../images/flags16.png') -90px -5px no-repeat;
1457
  }
1458
 
1459
  #flags.size16 a[title="Azerbaijani"],
1460
  .tool-container .tool-items a[title="Azerbaijani"] {
1461
- background:url('../images/flags16.png') -119px -5px no-repeat;
1462
  }
1463
 
1464
  #flags.size16 a[title="Basque"],
1465
  .tool-container .tool-items a[title="Basque"] {
1466
- background:url('../images/flags16.png') -148px -5px no-repeat;
1467
  }
1468
 
1469
  #flags.size16 a[title="Belarusian"],
1470
  .tool-container .tool-items a[title="Belarusian"] {
1471
- background:url('../images/flags16.png') -3px -34px no-repeat;
1472
  }
1473
 
1474
  #flags.size16 a[title="Bengali"],
1475
  .tool-container .tool-items a[title="Bengali"] {
1476
- background:url('../images/flags16.png') -32px -34px no-repeat;
1477
  }
1478
 
1479
  #flags.size16 a[title="Bosnian"],
1480
  .tool-container .tool-items a[title="Bosnian"] {
1481
- background:url('../images/flags16.png') -61px -34px no-repeat;
1482
  }
1483
 
1484
  #flags.size16 a[title="Bulgarian"],
1485
  .tool-container .tool-items a[title="Bulgarian"] {
1486
- background:url('../images/flags16.png') -90px -34px no-repeat;
1487
  }
1488
 
1489
  #flags.size16 a[title="Catalan"],
1490
  .tool-container .tool-items a[title="Catalan"] {
1491
- background:url('../images/flags16.png') -119px -34px no-repeat;
1492
  }
1493
 
1494
  #flags.size16 a[title="Cebuano"],
1495
  .tool-container .tool-items a[title="Cebuano"] {
1496
- background:url('../images/flags16.png') -148px -34px no-repeat;
 
 
 
 
 
1497
  }
1498
 
1499
  #flags.size16 a[title="Chinese"],
1500
  .tool-container .tool-items a[title="Chinese"] {
1501
- background:url('../images/flags16.png') -3px -63px no-repeat;
1502
  }
1503
 
1504
  #flags.size16 a[title="Chinese(Traditional)"],
1505
  .tool-container .tool-items a[title="Chinese(Traditional)"] {
1506
- background:url('../images/flags16.png') -32px -63px no-repeat;
1507
  }
1508
 
1509
  #flags.size16 a[title="Croatian"],
1510
  .tool-container .tool-items a[title="Croatian"] {
1511
- background:url('../images/flags16.png') -61px -63px no-repeat;
1512
  }
1513
 
1514
  #flags.size16 a[title="Czech"],
1515
  .tool-container .tool-items a[title="Czech"] {
1516
- background:url('../images/flags16.png') -90px -63px no-repeat;
1517
  }
1518
 
1519
  #flags.size16 a[title="Danish"],
1520
  .tool-container .tool-items a[title="Danish"] {
1521
- background:url('../images/flags16.png') -119px -63px no-repeat;
1522
  }
1523
 
1524
  #flags.size16 a[title="Dutch"],
1525
  .tool-container .tool-items a[title="Dutch"] {
1526
- background:url('../images/flags16.png') -148px -63px no-repeat;
1527
  }
1528
 
1529
  #flags.size16 a[title="Esperanto"],
1530
  .tool-container .tool-items a[title="Esperanto"] {
1531
- background:url('../images/flags16.png') -3px -92px no-repeat;
1532
  }
1533
 
1534
  #flags.size16 a[title="Estonian"],
1535
  .tool-container .tool-items a[title="Estonian"] {
1536
- background:url('../images/flags16.png') -31px -92px no-repeat;
1537
  }
1538
 
1539
  #flags.size16 a[title="Filipino"],
1540
  .tool-container .tool-items a[title="Filipino"] {
1541
- background:url('../images/flags16.png') -61px -92px no-repeat;
1542
  }
1543
 
1544
  #flags.size16 a[title="Finnish"],
1545
  .tool-container .tool-items a[title="Finnish"] {
1546
- background:url('../images/flags16.png') -90px -92px no-repeat;
1547
  }
1548
 
1549
  #flags.size16 a[title="French"],
1550
  .tool-container .tool-items a[title="French"] {
1551
- background:url('../images/flags16.png') -119px -92px no-repeat;
1552
  }
1553
 
1554
  #flags.size16 a[title="Galician"],
1555
  .tool-container .tool-items a[title="Galician"] {
1556
- background:url('../images/flags16.png') -148px -92px no-repeat;
1557
  }
1558
 
1559
  #flags.size16 a[title="Georgian"],
1560
  .tool-container .tool-items a[title="Georgian"] {
1561
- background:url('../images/flags16.png') -3px -121px no-repeat;
1562
  }
1563
 
1564
  #flags.size16 a[title="German"],
1565
  .tool-container .tool-items a[title="German"] {
1566
- background:url('../images/flags16.png') -32px -121px no-repeat;
1567
  }
1568
 
1569
  #flags.size16 a[title="Greek"],
1570
  .tool-container .tool-items a[title="Greek"] {
1571
- background:url('../images/flags16.png') -61px -121px no-repeat;
1572
  }
1573
 
1574
  #flags.size16 a[title="Gujarati"],
1575
  .tool-container .tool-items a[title="Gujarati"] {
1576
- background:url('../images/flags16.png') -90px -121px no-repeat;
1577
  }
1578
 
1579
  #flags.size16 a[title="Haitian"],
1580
  .tool-container .tool-items a[title="Haitian"] {
1581
- background:url('../images/flags16.png') -119px -121px no-repeat;
1582
  }
1583
 
1584
  #flags.size16 a[title="Hausa"],
1585
  .tool-container .tool-items a[title="Hausa"] {
1586
- background:url('../images/flags16.png') -148px -121px no-repeat;
1587
  }
1588
 
1589
  #flags.size16 a[title="Hebrew"],
1590
  .tool-container .tool-items a[title="Hebrew"] {
1591
- background:url('../images/flags16.png') -3px -150px no-repeat;
1592
  }
1593
 
1594
  #flags.size16 a[title="Hindi"],
1595
  .tool-container .tool-items a[title="Hindi"] {
1596
- background:url('../images/flags16.png') -32px -150px no-repeat;
1597
  }
1598
 
1599
  #flags.size16 a[title="Hmong"],
1600
  .tool-container .tool-items a[title="Hmong"] {
1601
- background:url('../images/flags16.png') -61px -150px no-repeat;
1602
  }
1603
 
1604
  #flags.size16 a[title="Hungarian"],
1605
  .tool-container .tool-items a[title="Hungarian"] {
1606
- background:url('../images/flags16.png') -90px -150px no-repeat;
1607
  }
1608
 
1609
  #flags.size16 a[title="Icelandic"],
1610
  .tool-container .tool-items a[title="Icelandic"] {
1611
- background:url('../images/flags16.png') -119px -150px no-repeat;
1612
  }
1613
 
1614
  #flags.size16 a[title="Igbo"],
1615
  .tool-container .tool-items a[title="Igbo"] {
1616
- background:url('../images/flags16.png') -148px -150px no-repeat;
1617
  }
1618
 
1619
  #flags.size16 a[title="Indonesian"],
1620
  .tool-container .tool-items a[title="Indonesian"] {
1621
- background:url('../images/flags16.png') -3px -179px no-repeat;
1622
  }
1623
 
1624
  #flags.size16 a[title="Irish"],
1625
  .tool-container .tool-items a[title="Irish"] {
1626
- background:url('../images/flags16.png') -32px -179px no-repeat;
1627
  }
1628
 
1629
  #flags.size16 a[title="Italian"],
1630
  .tool-container .tool-items a[title="Italian"] {
1631
- background:url('../images/flags16.png') -61px -179px no-repeat;
1632
  }
1633
 
1634
  #flags.size16 a[title="Japanese"],
1635
  .tool-container .tool-items a[title="Japanese"] {
1636
- background:url('../images/flags16.png') -90px -179px no-repeat;
1637
  }
1638
 
1639
  #flags.size16 a[title="Javanese"],
1640
  .tool-container .tool-items a[title="Javanese"] {
1641
- background:url('../images/flags16.png') -119px -179px no-repeat;
1642
  }
1643
 
1644
  #flags.size16 a[title="Kannada"],
1645
  .tool-container .tool-items a[title="Kannada"] {
1646
- background:url('../images/flags16.png') -148px -179px no-repeat;
 
 
 
 
 
1647
  }
1648
 
1649
  #flags.size16 a[title="Khmer"],
1650
  .tool-container .tool-items a[title="Khmer"] {
1651
- background:url('../images/flags16.png') -3px -208px no-repeat;
1652
  }
1653
 
1654
  #flags.size16 a[title="Korean"],
1655
  .tool-container .tool-items a[title="Korean"] {
1656
- background:url('../images/flags16.png') -32px -208px no-repeat;
1657
  }
1658
 
1659
  #flags.size16 a[title="Lao"],
1660
  .tool-container .tool-items a[title="Lao"] {
1661
- background:url('../images/flags16.png') -61px -208px no-repeat;
1662
  }
1663
 
1664
  #flags.size16 a[title="Latin"],
1665
  .tool-container .tool-items a[title="Latin"] {
1666
- background:url('../images/flags16.png') -90px -208px no-repeat;
1667
  }
1668
 
1669
  #flags.size16 a[title="Latvian"],
1670
  .tool-container .tool-items a[title="Latvian"] {
1671
- background:url('../images/flags16.png') -119px -208px no-repeat;
1672
  }
1673
 
1674
  #flags.size16 a[title="Lithuanian"],
1675
  .tool-container .tool-items a[title="Lithuanian"] {
1676
- background:url('../images/flags16.png') -148px -208px no-repeat;
1677
  }
1678
 
1679
  #flags.size16 a[title="Macedonian"],
1680
  .tool-container .tool-items a[title="Macedonian"] {
1681
- background:url('../images/flags16.png') -3px -237px no-repeat;
1682
  }
1683
 
1684
  #flags.size16 a[title="Malay"],
1685
  .tool-container .tool-items a[title="Malay"] {
1686
- background:url('../images/flags16.png') -32px -237px no-repeat;
 
 
 
 
 
 
 
 
 
 
1687
  }
1688
 
1689
  #flags.size16 a[title="Maltese"],
1690
  .tool-container .tool-items a[title="Maltese"] {
1691
- background:url('../images/flags16.png') -61px -237px no-repeat;
1692
  }
1693
 
1694
  #flags.size16 a[title="Maori"],
1695
  .tool-container .tool-items a[title="Maori"] {
1696
- background:url('../images/flags16.png') -90px -237px no-repeat;
1697
  }
1698
 
1699
  #flags.size16 a[title="Marathi"],
1700
  .tool-container .tool-items a[title="Marathi"] {
1701
- background:url('../images/flags16.png') -119px -237px no-repeat;
1702
  }
1703
 
1704
  #flags.size16 a[title="Mongolian"],
1705
  .tool-container .tool-items a[title="Mongolian"] {
1706
- background:url('../images/flags16.png') -148px -237px no-repeat;
 
 
 
 
 
1707
  }
1708
 
1709
  #flags.size16 a[title="Nepali"],
1710
  .tool-container .tool-items a[title="Nepali"] {
1711
- background:url('../images/flags16.png') -3px -266px no-repeat;
1712
  }
1713
 
1714
  #flags.size16 a[title="Norwegian"],
1715
  .tool-container .tool-items a[title="Norwegian"] {
1716
- background:url('../images/flags16.png') -32px -266px no-repeat;
1717
  }
1718
 
1719
  #flags.size16 a[title="Persian"],
1720
  .tool-container .tool-items a[title="Persian"] {
1721
- background:url('../images/flags16.png') -61px -266px no-repeat;
1722
  }
1723
 
1724
  #flags.size16 a[title="Polish"],
1725
  .tool-container .tool-items a[title="Polish"] {
1726
- background:url('../images/flags16.png') -90px -266px no-repeat;
1727
  }
1728
 
1729
  #flags.size16 a[title="Portuguese"],
1730
  .tool-container .tool-items a[title="Portuguese"] {
1731
- background:url('../images/flags16.png') -119px -266px no-repeat;
1732
  }
1733
 
1734
  #flags.size16 a[title="Punjabi"],
1735
  .tool-container .tool-items a[title="Punjabi"] {
1736
- background:url('../images/flags16.png') -148px -266px no-repeat;
1737
  }
1738
 
1739
  #flags.size16 a[title="Romanian"],
1740
  .tool-container .tool-items a[title="Romanian"] {
1741
- background:url('../images/flags16.png') -3px -295px no-repeat;
1742
  }
1743
 
1744
  #flags.size16 a[title="Russian"],
1745
  .tool-container .tool-items a[title="Russian"] {
1746
- background:url('../images/flags16.png') -32px -295px no-repeat;
1747
  }
1748
 
1749
  #flags.size16 a[title="Serbian"],
1750
  .tool-container .tool-items a[title="Serbian"] {
1751
- background:url('../images/flags16.png') -61px -295px no-repeat;
 
 
 
 
 
 
 
 
 
 
1752
  }
1753
 
1754
  #flags.size16 a[title="Slovak"],
1755
  .tool-container .tool-items a[title="Slovak"] {
1756
- background:url('../images/flags16.png') -90px -295px no-repeat;
1757
  }
1758
 
1759
  #flags.size16 a[title="Slovenian"],
1760
  .tool-container .tool-items a[title="Slovenian"] {
1761
- background:url('../images/flags16.png') -119px -295px no-repeat;
1762
  }
1763
 
1764
  #flags.size16 a[title="Somali"],
1765
  .tool-container .tool-items a[title="Somali"] {
1766
- background:url('../images/flags16.png') -148px -295px no-repeat;
1767
  }
1768
 
1769
  #flags.size16 a[title="Spanish"],
1770
  .tool-container .tool-items a[title="Spanish"] {
1771
- background:url('../images/flags16.png') -3px -324px no-repeat;
1772
  }
1773
 
1774
  #flags.size16 a[title="Swahili"],
1775
  .tool-container .tool-items a[title="Swahili"] {
1776
- background:url('../images/flags16.png') -32px -324px no-repeat;
1777
  }
1778
 
1779
  #flags.size16 a[title="Swedish"],
1780
  .tool-container .tool-items a[title="Swedish"] {
1781
- background:url('../images/flags16.png') -61px -324px no-repeat;
 
 
 
 
 
 
 
 
 
 
1782
  }
1783
 
1784
  #flags.size16 a[title="Tamil"],
1785
  .tool-container .tool-items a[title="Tamil"] {
1786
- background:url('../images/flags16.png') -90px -324px no-repeat;
1787
  }
1788
 
1789
  #flags.size16 a[title="Telugu"],
1790
  .tool-container .tool-items a[title="Telugu"] {
1791
- background:url('../images/flags16.png') -119px -324px no-repeat;
1792
  }
1793
 
1794
  #flags.size16 a[title="Thai"],
1795
  .tool-container .tool-items a[title="Thai"] {
1796
- background:url('../images/flags16.png') -148px -324px no-repeat;
1797
  }
1798
 
1799
  #flags.size16 a[title="Turkish"],
1800
  .tool-container .tool-items a[title="Turkish"] {
1801
- background:url('../images/flags16.png') -32px -353px no-repeat;
1802
  }
1803
 
1804
  #flags.size16 a[title="Ukranian"],
1805
  .tool-container .tool-items a[title="Ukranian"] {
1806
- background:url('../images/flags16.png') -61px -353px no-repeat;
1807
  }
1808
 
1809
  #flags.size16 a[title="English"],
1810
  .tool-container .tool-items a[title="English"] {
1811
- background:url('../images/flags16.png') -90px -353px no-repeat;
1812
  }
1813
 
1814
  #flags.size16 a[title="Urdu"],
1815
  .tool-container .tool-items a[title="Urdu"] {
1816
- background:url('../images/flags16.png') -148px -353px no-repeat;
 
 
 
 
 
1817
  }
1818
 
1819
  #flags.size16 a[title="Vietnamese"],
1820
  .tool-container .tool-items a[title="Vietnamese"] {
1821
- background:url('../images/flags16.png') -3px -382px no-repeat;
1822
  }
1823
 
1824
  #flags.size16 a[title="Welsh"],
1825
  .tool-container .tool-items a[title="Welsh"] {
1826
- background:url('../images/flags16.png') -32px -382px no-repeat;
1827
  }
1828
 
1829
  #flags.size16 a[title="Yiddish"],
1830
  .tool-container .tool-items a[title="Yiddish"] {
1831
- background:url('../images/flags16.png') -61px -382px no-repeat;
1832
  }
1833
 
1834
  #flags.size16 a[title="Yoruba"],
1835
  .tool-container .tool-items a[title="Yoruba"] {
1836
- background:url('../images/flags16.png') -90px -382px no-repeat;
1837
  }
1838
 
1839
  #flags.size16 a[title="Zulu"],
1840
  .tool-container .tool-items a[title="Zulu"] {
1841
- background:url('../images/flags16.png') -119px -382px no-repeat;
1842
  }
1843
 
1844
  /* Individual flag backgrounds (24px) */
@@ -1903,6 +2103,11 @@ code {
1903
  background:url('../images/flags.png') -145px -32px no-repeat;
1904
  }
1905
 
 
 
 
 
 
1906
  #flags.size24 a[title="Chinese"],
1907
  .tool-container .tool-items a[title="Chinese"] {
1908
  background:url('../images/flags.png') 0 -61px no-repeat;
@@ -2053,6 +2258,11 @@ code {
2053
  background:url('../images/flags.png') -145px -177px no-repeat;
2054
  }
2055
 
 
 
 
 
 
2056
  #flags.size24 a[title="Khmer"],
2057
  .tool-container .tool-items a[title="Khmer"] {
2058
  background:url('../images/flags.png') 0 -206px no-repeat;
@@ -2088,11 +2298,21 @@ code {
2088
  background:url('../images/flags.png') 0 -235px no-repeat;
2089
  }
2090
 
 
 
 
 
 
2091
  #flags.size24 a[title="Malay"],
2092
  .tool-container .tool-items a[title="Malay"] {
2093
  background:url('../images/flags.png') -29px -235px no-repeat;
2094
  }
2095
 
 
 
 
 
 
2096
  #flags.size24 a[title="Maltese"],
2097
  .tool-container .tool-items a[title="Maltese"] {
2098
  background:url('../images/flags.png') -58px -235px no-repeat;
@@ -2113,6 +2333,11 @@ code {
2113
  background:url('../images/flags.png') -145px -235px no-repeat;
2114
  }
2115
 
 
 
 
 
 
2116
  #flags.size24 a[title="Nepali"],
2117
  .tool-container .tool-items a[title="Nepali"] {
2118
  background:url('../images/flags.png') 0 -264px no-repeat;
@@ -2158,6 +2383,16 @@ code {
2158
  background:url('../images/flags.png') -58px -293px no-repeat;
2159
  }
2160
 
 
 
 
 
 
 
 
 
 
 
2161
  #flags.size24 a[title="Slovak"],
2162
  .tool-container .tool-items a[title="Slovak"] {
2163
  background:url('../images/flags.png') -87px -293px no-repeat;
@@ -2178,6 +2413,11 @@ code {
2178
  background:url('../images/flags.png') 0 -322px no-repeat;
2179
  }
2180
 
 
 
 
 
 
2181
  #flags.size24 a[title="Swahili"],
2182
  .tool-container .tool-items a[title="Swahili"] {
2183
  background:url('../images/flags.png') -29px -322px no-repeat;
@@ -2188,6 +2428,11 @@ code {
2188
  background:url('../images/flags.png') -58px -322px no-repeat;
2189
  }
2190
 
 
 
 
 
 
2191
  #flags.size24 a[title="Tamil"],
2192
  .tool-container .tool-items a[title="Tamil"] {
2193
  background:url('../images/flags.png') -87px -322px no-repeat;
@@ -2223,6 +2468,11 @@ code {
2223
  background:url('../images/flags.png') -145px -351px no-repeat;
2224
  }
2225
 
 
 
 
 
 
2226
  #flags.size24 a[title="Vietnamese"],
2227
  .tool-container .tool-items a[title="Vietnamese"] {
2228
  background:url('../images/flags.png') 0 -380px no-repeat;
@@ -2246,4 +2496,4 @@ code {
2246
  #flags.size24 a[title="Zulu"],
2247
  .tool-container .tool-items a[title="Zulu"] {
2248
  background:url('../images/flags.png') -116px -380px no-repeat;
2249
- }
275
  background:url('../images/flags22.png') -146px -32px no-repeat;
276
  }
277
 
278
+ #flags.size22 a[title="Chichewa"],
279
+ .tool-container .tool-items a[title="Chichewa"] {
280
+ background:url('../images/flags22.png') -88px -409px no-repeat;
281
+ }
282
+
283
  #flags.size22 a[title="Chinese"],
284
  .tool-container .tool-items a[title="Chinese"] {
285
  background:url('../images/flags22.png') -1px -61px no-repeat;
430
  background:url('../images/flags22.png') -146px -177px no-repeat;
431
  }
432
 
433
+ #flags.size22 a[title="Kazakh"],
434
+ .tool-container .tool-items a[title="Kazakh"] {
435
+ background:url('../images/flags22.png') -1px -409px no-repeat;
436
+ }
437
+
438
  #flags.size22 a[title="Khmer"],
439
  .tool-container .tool-items a[title="Khmer"] {
440
  background:url('../images/flags22.png') -1px -206px no-repeat;
470
  background:url('../images/flags22.png') -1px -235px no-repeat;
471
  }
472
 
473
+ #flags.size22 a[title="Malagasy"],
474
+ .tool-container .tool-items a[title="Malagasy"] {
475
+ background:url('../images/flags22.png') -59px -409px no-repeat;
476
+ }
477
+
478
  #flags.size22 a[title="Malay"],
479
  .tool-container .tool-items a[title="Malay"] {
480
  background:url('../images/flags22.png') -30px -235px no-repeat;
481
  }
482
 
483
+ #flags.size22 a[title="Malayalam"],
484
+ .tool-container .tool-items a[title="Malayalam"] {
485
+ background:url('../images/flags22.png') -117px -409px no-repeat;
486
+ }
487
+
488
  #flags.size22 a[title="Maltese"],
489
  .tool-container .tool-items a[title="Maltese"] {
490
  background:url('../images/flags22.png') -59px -235px no-repeat;
505
  background:url('../images/flags22.png') -146px -235px no-repeat;
506
  }
507
 
508
+ #flags.size22 a[title="Myanmar(Burmese)"],
509
+ .tool-container .tool-items a[title="Myanmar(Burmese)"] {
510
+ background:url('../images/flags22.png') -146px -409px no-repeat;
511
+ }
512
+
513
  #flags.size22 a[title="Nepali"],
514
  .tool-container .tool-items a[title="Nepali"] {
515
  background:url('../images/flags22.png') -1px -264px no-repeat;
555
  background:url('../images/flags22.png') -59px -293px no-repeat;
556
  }
557
 
558
+ #flags.size22 a[title="Sesotho"],
559
+ .tool-container .tool-items a[title="Sesotho"] {
560
+ background:url('../images/flags22.png') -30px -409px no-repeat;
561
+ }
562
+
563
+ #flags.size22 a[title="Sinhala"],
564
+ .tool-container .tool-items a[title="Sinhala"] {
565
+ background:url('../images/flags22.png') -1px -438px no-repeat;
566
+ }
567
+
568
  #flags.size22 a[title="Slovak"],
569
  .tool-container .tool-items a[title="Slovak"] {
570
  background:url('../images/flags22.png') -88px -293px no-repeat;
585
  background:url('../images/flags22.png') -1px -322px no-repeat;
586
  }
587
 
588
+ #flags.size22 a[title="Sundanese"],
589
+ .tool-container .tool-items a[title="Sundanese"] {
590
+ background:url('../images/flags22.png') -146px -380px no-repeat;
591
+ }
592
+
593
  #flags.size22 a[title="Swahili"],
594
  .tool-container .tool-items a[title="Swahili"] {
595
  background:url('../images/flags22.png') -30px -322px no-repeat;
600
  background:url('../images/flags22.png') -59px -322px no-repeat;
601
  }
602
 
603
+ #flags.size22 a[title="Tajik"],
604
+ .tool-container .tool-items a[title="Tajik"] {
605
+ background:url('../images/flags22.png') -30px -438px no-repeat;
606
+ }
607
+
608
  #flags.size22 a[title="Tamil"],
609
  .tool-container .tool-items a[title="Tamil"] {
610
  background:url('../images/flags22.png') -88px -322px no-repeat;
630
  background:url('../images/flags22.png') -59px -351px no-repeat;
631
  }
632
 
633
+ #flags.size22 a[title="Uzbek"],
634
+ .tool-container .tool-items a[title="Uzbek"] {
635
+ background:url('../images/flags22.png') -59px -438px no-repeat;
636
+ }
637
+
638
  #flags.size22 a[title="English"],
639
  .tool-container .tool-items a[title="English"] {
640
  background:url('../images/flags22.png') -88px -351px no-repeat;
732
  background:url('../images/flags18.png') -147px -33px no-repeat;
733
  }
734
 
735
+ #flags.size18 a[title="Chichewa"],
736
+ .tool-container .tool-items a[title="Chichewa"] {
737
+ background:url('../images/flags18.png') -89px -410px no-repeat;
738
+ }
739
+
740
  #flags.size18 a[title="Chinese"],
741
  .tool-container .tool-items a[title="Chinese"] {
742
  background:url('../images/flags18.png') -2px -62px no-repeat;
887
  background:url('../images/flags18.png') -147px -178px no-repeat;
888
  }
889
 
890
+ #flags.size18 a[title="Kazakh"],
891
+ .tool-container .tool-items a[title="Kazakh"] {
892
+ background:url('../images/flags18.png') -2px -410px no-repeat;
893
+ }
894
+
895
  #flags.size18 a[title="Khmer"],
896
  .tool-container .tool-items a[title="Khmer"] {
897
  background:url('../images/flags18.png') -2px -207px no-repeat;
927
  background:url('../images/flags18.png') -2px -236px no-repeat;
928
  }
929
 
930
+ #flags.size18 a[title="Malagasy"],
931
+ .tool-container .tool-items a[title="Malagasy"] {
932
+ background:url('../images/flags18.png') -60px -410px no-repeat;
933
+ }
934
+
935
  #flags.size18 a[title="Malay"],
936
  .tool-container .tool-items a[title="Malay"] {
937
  background:url('../images/flags18.png') -31px -236px no-repeat;
938
  }
939
 
940
+ #flags.size18 a[title="Malayalam"],
941
+ .tool-container .tool-items a[title="Malayalam"] {
942
+ background:url('../images/flags18.png') -118px -410px no-repeat;
943
+ }
944
+
945
  #flags.size18 a[title="Maltese"],
946
  .tool-container .tool-items a[title="Maltese"] {
947
  background:url('../images/flags18.png') -60px -236px no-repeat;
962
  background:url('../images/flags18.png') -147px -236px no-repeat;
963
  }
964
 
965
+ #flags.size18 a[title="Myanmar(Burmese)"],
966
+ .tool-container .tool-items a[title="Myanmar(Burmese)"] {
967
+ background:url('../images/flags18.png') -147px -410px no-repeat;
968
+ }
969
+
970
  #flags.size18 a[title="Nepali"],
971
  .tool-container .tool-items a[title="Nepali"] {
972
  background:url('../images/flags18.png') -2px -265px no-repeat;
1012
  background:url('../images/flags18.png') -60px -294px no-repeat;
1013
  }
1014
 
1015
+ #flags.size18 a[title="Sesotho"],
1016
+ .tool-container .tool-items a[title="Sesotho"] {
1017
+ background:url('../images/flags18.png') -31px -410px no-repeat;
1018
+ }
1019
+
1020
+ #flags.size18 a[title="Sinhala"],
1021
+ .tool-container .tool-items a[title="Sinhala"] {
1022
+ background:url('../images/flags18.png') -2px -439px no-repeat;
1023
+ }
1024
+
1025
  #flags.size18 a[title="Slovak"],
1026
  .tool-container .tool-items a[title="Slovak"] {
1027
  background:url('../images/flags18.png') -89px -294px no-repeat;
1042
  background:url('../images/flags18.png') -2px -323px no-repeat;
1043
  }
1044
 
1045
+ #flags.size18 a[title="Sundanese"],
1046
+ .tool-container .tool-items a[title="Sundanese"] {
1047
+ background:url('../images/flags18.png') -147px -381px no-repeat;
1048
+ }
1049
+
1050
  #flags.size18 a[title="Swahili"],
1051
  .tool-container .tool-items a[title="Swahili"] {
1052
  background:url('../images/flags18.png') -31px -323px no-repeat;
1057
  background:url('../images/flags18.png') -60px -323px no-repeat;
1058
  }
1059
 
1060
+ #flags.size18 a[title="Tajik"],
1061
+ .tool-container .tool-items a[title="Tajik"] {
1062
+ background:url('../images/flags18.png') -31px -439px no-repeat;
1063
+ }
1064
+
1065
  #flags.size18 a[title="Tamil"],
1066
  .tool-container .tool-items a[title="Tamil"] {
1067
  background:url('../images/flags18.png') -89px -323px no-repeat;
1097
  background:url('../images/flags18.png') -147px -352px no-repeat;
1098
  }
1099
 
1100
+ #flags.size18 a[title="Uzbek"],
1101
+ .tool-container .tool-items a[title="Uzbek"] {
1102
+ background:url('../images/flags18.png') -60px -439px no-repeat;
1103
+ }
1104
+
1105
  #flags.size18 a[title="Vietnamese"],
1106
  .tool-container .tool-items a[title="Vietnamese"] {
1107
  background:url('../images/flags18.png') -2px -381px no-repeat;
1189
  background:url('../images/flags20.png') -147px -33px no-repeat;
1190
  }
1191
 
1192
+ #flags.size20 a[title="Chichewa"],
1193
+ .tool-container .tool-items a[title="Chichewa"] {
1194
+ background:url('../images/flags20.png') -89px -410px no-repeat;
1195
+ }
1196
+
1197
  #flags.size20 a[title="Chinese"],
1198
  .tool-container .tool-items a[title="Chinese"] {
1199
  background:url('../images/flags20.png') -2px -62px no-repeat;
1344
  background:url('../images/flags20.png') -147px -178px no-repeat;
1345
  }
1346
 
1347
+ #flags.size20 a[title="Kazakh"],
1348
+ .tool-container .tool-items a[title="Kazakh"] {
1349
+ background:url('../images/flags20.png') -2px -410px no-repeat;
1350
+ }
1351
+
1352
  #flags.size20 a[title="Khmer"],
1353
  .tool-container .tool-items a[title="Khmer"] {
1354
  background:url('../images/flags20.png') -2px -207px no-repeat;
1384
  background:url('../images/flags20.png') -2px -236px no-repeat;
1385
  }
1386
 
1387
+ #flags.size20 a[title="Malagasy"],
1388
+ .tool-container .tool-items a[title="Malagasy"] {
1389
+ background:url('../images/flags20.png') -60px -410px no-repeat;
1390
+ }
1391
+
1392
  #flags.size20 a[title="Malay"],
1393
  .tool-container .tool-items a[title="Malay"] {
1394
  background:url('../images/flags20.png') -31px -236px no-repeat;
1399
  background:url('../images/flags20.png') -60px -236px no-repeat;
1400
  }
1401
 
1402
+ #flags.size20 a[title="Malayalam"],
1403
+ .tool-container .tool-items a[title="Malayalam"] {
1404
+ background:url('../images/flags20.png') -118px -410px no-repeat;
1405
+ }
1406
+
1407
  #flags.size20 a[title="Maori"],
1408
  .tool-container .tool-items a[title="Maori"] {
1409
  background:url('../images/flags20.png') -89px -236px no-repeat;
1419
  background:url('../images/flags20.png') -147px -236px no-repeat;
1420
  }
1421
 
1422
+ #flags.size20 a[title="Myanmar(Burmese)"],
1423
+ .tool-container .tool-items a[title="Myanmar(Burmese)"] {
1424
+ background:url('../images/flags20.png') -147px -410px no-repeat;
1425
+ }
1426
+
1427
  #flags.size20 a[title="Nepali"],
1428
  .tool-container .tool-items a[title="Nepali"] {
1429
  background:url('../images/flags20.png') -2px -265px no-repeat;
1469
  background:url('../images/flags20.png') -60px -294px no-repeat;
1470
  }
1471
 
1472
+ #flags.size20 a[title="Sesotho"],
1473
+ .tool-container .tool-items a[title="Sesotho"] {
1474
+ background:url('../images/flags20.png') -31px -410px no-repeat;
1475
+ }
1476
+
1477
+ #flags.size20 a[title="Sinhala"],
1478
+ .tool-container .tool-items a[title="Sinhala"] {
1479
+ background:url('../images/flags20.png') -2px -439px no-repeat;
1480
+ }
1481
+
1482
  #flags.size20 a[title="Slovak"],
1483
  .tool-container .tool-items a[title="Slovak"] {
1484
  background:url('../images/flags20.png') -89px -294px no-repeat;
1499
  background:url('../images/flags20.png') -2px -323px no-repeat;
1500
  }
1501
 
1502
+ #flags.size20 a[title="Sundanese"],
1503
+ .tool-container .tool-items a[title="Sundanese"] {
1504
+ background:url('../images/flags20.png') -147px -381px no-repeat;
1505
+ }
1506
+
1507
  #flags.size20 a[title="Swahili"],
1508
  .tool-container .tool-items a[title="Swahili"] {
1509
  background:url('../images/flags20.png') -31px -323px no-repeat;
1514
  background:url('../images/flags20.png') -60px -323px no-repeat;
1515
  }
1516
 
1517
+ #flags.size20 a[title="Tajik"],
1518
+ .tool-container .tool-items a[title="Tajik"] {
1519
+ background:url('../images/flags20.png') -31px -439px no-repeat;
1520
+ }
1521
+
1522
  #flags.size20 a[title="Tamil"],
1523
  .tool-container .tool-items a[title="Tamil"] {
1524
  background:url('../images/flags20.png') -89px -323px no-repeat;
1554
  background:url('../images/flags20.png') -147px -352px no-repeat;
1555
  }
1556
 
1557
+ #flags.size20 a[title="Uzbek"],
1558
+ .tool-container .tool-items a[title="Uzbek"] {
1559
+ background:url('../images/flags20.png') -60px -439px no-repeat;
1560
+ }
1561
+
1562
  #flags.size20 a[title="Vietnamese"],
1563
  .tool-container .tool-items a[title="Vietnamese"] {
1564
  background:url('../images/flags20.png') -2px -381px no-repeat;
1588
 
1589
  #flags.size16 a[title="Afrikaans"],
1590
  .tool-container .tool-items a[title="Afrikaans"] {
1591
+ background:url('../images/flags16.png') -4px -5px no-repeat;
1592
  }
1593
 
1594
  #flags.size16 a[title="Albanian"],
1595
  .tool-container .tool-items a[title="Albanian"] {
1596
+ background:url('../images/flags16.png') -33px -5px no-repeat;
1597
  }
1598
 
1599
  #flags.size16 a[title="Arabic"],
1600
  .tool-container .tool-items a[title="Arabic"] {
1601
+ background:url('../images/flags16.png') -62px -5px no-repeat;
1602
  }
1603
 
1604
  #flags.size16 a[title="Armenian"],
1605
  .tool-container .tool-items a[title="Armenian"] {
1606
+ background:url('../images/flags16.png') -91px -5px no-repeat;
1607
  }
1608
 
1609
  #flags.size16 a[title="Azerbaijani"],
1610
  .tool-container .tool-items a[title="Azerbaijani"] {
1611
+ background:url('../images/flags16.png') -120px -5px no-repeat;
1612
  }
1613
 
1614
  #flags.size16 a[title="Basque"],
1615
  .tool-container .tool-items a[title="Basque"] {
1616
+ background:url('../images/flags16.png') -149px -5px no-repeat;
1617
  }
1618
 
1619
  #flags.size16 a[title="Belarusian"],
1620
  .tool-container .tool-items a[title="Belarusian"] {
1621
+ background:url('../images/flags16.png') -4px -34px no-repeat;
1622
  }
1623
 
1624
  #flags.size16 a[title="Bengali"],
1625
  .tool-container .tool-items a[title="Bengali"] {
1626
+ background:url('../images/flags16.png') -33px -34px no-repeat;
1627
  }
1628
 
1629
  #flags.size16 a[title="Bosnian"],
1630
  .tool-container .tool-items a[title="Bosnian"] {
1631
+ background:url('../images/flags16.png') -62px -34px no-repeat;
1632
  }
1633
 
1634
  #flags.size16 a[title="Bulgarian"],
1635
  .tool-container .tool-items a[title="Bulgarian"] {
1636
+ background:url('../images/flags16.png') -91px -34px no-repeat;
1637
  }
1638
 
1639
  #flags.size16 a[title="Catalan"],
1640
  .tool-container .tool-items a[title="Catalan"] {
1641
+ background:url('../images/flags16.png') -120px -34px no-repeat;
1642
  }
1643
 
1644
  #flags.size16 a[title="Cebuano"],
1645
  .tool-container .tool-items a[title="Cebuano"] {
1646
+ background:url('../images/flags16.png') -149px -34px no-repeat;
1647
+ }
1648
+
1649
+ #flags.size16 a[title="Chichewa"],
1650
+ .tool-container .tool-items a[title="Chichewa"] {
1651
+ background:url('../images/flags16.png') -91px -411px no-repeat;
1652
  }
1653
 
1654
  #flags.size16 a[title="Chinese"],
1655
  .tool-container .tool-items a[title="Chinese"] {
1656
+ background:url('../images/flags16.png') -4px -63px no-repeat;
1657
  }
1658
 
1659
  #flags.size16 a[title="Chinese(Traditional)"],
1660
  .tool-container .tool-items a[title="Chinese(Traditional)"] {
1661
+ background:url('../images/flags16.png') -33px -63px no-repeat;
1662
  }
1663
 
1664
  #flags.size16 a[title="Croatian"],
1665
  .tool-container .tool-items a[title="Croatian"] {
1666
+ background:url('../images/flags16.png') -62px -63px no-repeat;
1667
  }
1668
 
1669
  #flags.size16 a[title="Czech"],
1670
  .tool-container .tool-items a[title="Czech"] {
1671
+ background:url('../images/flags16.png') -91px -63px no-repeat;
1672
  }
1673
 
1674
  #flags.size16 a[title="Danish"],
1675
  .tool-container .tool-items a[title="Danish"] {
1676
+ background:url('../images/flags16.png') -120px -63px no-repeat;
1677
  }
1678
 
1679
  #flags.size16 a[title="Dutch"],
1680
  .tool-container .tool-items a[title="Dutch"] {
1681
+ background:url('../images/flags16.png') -149px -63px no-repeat;
1682
  }
1683
 
1684
  #flags.size16 a[title="Esperanto"],
1685
  .tool-container .tool-items a[title="Esperanto"] {
1686
+ background:url('../images/flags16.png') -4px -92px no-repeat;
1687
  }
1688
 
1689
  #flags.size16 a[title="Estonian"],
1690
  .tool-container .tool-items a[title="Estonian"] {
1691
+ background:url('../images/flags16.png') -33px -92px no-repeat;
1692
  }
1693
 
1694
  #flags.size16 a[title="Filipino"],
1695
  .tool-container .tool-items a[title="Filipino"] {
1696
+ background:url('../images/flags16.png') -62px -92px no-repeat;
1697
  }
1698
 
1699
  #flags.size16 a[title="Finnish"],
1700
  .tool-container .tool-items a[title="Finnish"] {
1701
+ background:url('../images/flags16.png') -91px -92px no-repeat;
1702
  }
1703
 
1704
  #flags.size16 a[title="French"],
1705
  .tool-container .tool-items a[title="French"] {
1706
+ background:url('../images/flags16.png') -120px -92px no-repeat;
1707
  }
1708
 
1709
  #flags.size16 a[title="Galician"],
1710
  .tool-container .tool-items a[title="Galician"] {
1711
+ background:url('../images/flags16.png') -149px -92px no-repeat;
1712
  }
1713
 
1714
  #flags.size16 a[title="Georgian"],
1715
  .tool-container .tool-items a[title="Georgian"] {
1716
+ background:url('../images/flags16.png') -4px -121px no-repeat;
1717
  }
1718
 
1719
  #flags.size16 a[title="German"],
1720
  .tool-container .tool-items a[title="German"] {
1721
+ background:url('../images/flags16.png') -33px -121px no-repeat;
1722
  }
1723
 
1724
  #flags.size16 a[title="Greek"],
1725
  .tool-container .tool-items a[title="Greek"] {
1726
+ background:url('../images/flags16.png') -62px -121px no-repeat;
1727
  }
1728
 
1729
  #flags.size16 a[title="Gujarati"],
1730
  .tool-container .tool-items a[title="Gujarati"] {
1731
+ background:url('../images/flags16.png') -91px -121px no-repeat;
1732
  }
1733
 
1734
  #flags.size16 a[title="Haitian"],
1735
  .tool-container .tool-items a[title="Haitian"] {
1736
+ background:url('../images/flags16.png') -120px -121px no-repeat;
1737
  }
1738
 
1739
  #flags.size16 a[title="Hausa"],
1740
  .tool-container .tool-items a[title="Hausa"] {
1741
+ background:url('../images/flags16.png') -149px -121px no-repeat;
1742
  }
1743
 
1744
  #flags.size16 a[title="Hebrew"],
1745
  .tool-container .tool-items a[title="Hebrew"] {
1746
+ background:url('../images/flags16.png') -4px -150px no-repeat;
1747
  }
1748
 
1749
  #flags.size16 a[title="Hindi"],
1750
  .tool-container .tool-items a[title="Hindi"] {
1751
+ background:url('../images/flags16.png') -33px -150px no-repeat;
1752
  }
1753
 
1754
  #flags.size16 a[title="Hmong"],
1755
  .tool-container .tool-items a[title="Hmong"] {
1756
+ background:url('../images/flags16.png') -62px -150px no-repeat;
1757
  }
1758
 
1759
  #flags.size16 a[title="Hungarian"],
1760
  .tool-container .tool-items a[title="Hungarian"] {
1761
+ background:url('../images/flags16.png') -91px -150px no-repeat;
1762
  }
1763
 
1764
  #flags.size16 a[title="Icelandic"],
1765
  .tool-container .tool-items a[title="Icelandic"] {
1766
+ background:url('../images/flags16.png') -120px -150px no-repeat;
1767
  }
1768
 
1769
  #flags.size16 a[title="Igbo"],
1770
  .tool-container .tool-items a[title="Igbo"] {
1771
+ background:url('../images/flags16.png') -149px -150px no-repeat;
1772
  }
1773
 
1774
  #flags.size16 a[title="Indonesian"],
1775
  .tool-container .tool-items a[title="Indonesian"] {
1776
+ background:url('../images/flags16.png') -4px -179px no-repeat;
1777
  }
1778
 
1779
  #flags.size16 a[title="Irish"],
1780
  .tool-container .tool-items a[title="Irish"] {
1781
+ background:url('../images/flags16.png') -33px -179px no-repeat;
1782
  }
1783
 
1784
  #flags.size16 a[title="Italian"],
1785
  .tool-container .tool-items a[title="Italian"] {
1786
+ background:url('../images/flags16.png') -62px -179px no-repeat;
1787
  }
1788
 
1789
  #flags.size16 a[title="Japanese"],
1790
  .tool-container .tool-items a[title="Japanese"] {
1791
+ background:url('../images/flags16.png') -91px -179px no-repeat;
1792
  }
1793
 
1794
  #flags.size16 a[title="Javanese"],
1795
  .tool-container .tool-items a[title="Javanese"] {
1796
+ background:url('../images/flags16.png') -120px -179px no-repeat;
1797
  }
1798
 
1799
  #flags.size16 a[title="Kannada"],
1800
  .tool-container .tool-items a[title="Kannada"] {
1801
+ background:url('../images/flags16.png') -149px -179px no-repeat;
1802
+ }
1803
+
1804
+ #flags.size16 a[title="Kazakh"],
1805
+ .tool-container .tool-items a[title="Kazakh"] {
1806
+ background:url('../images/flags16.png') -4px -411px no-repeat;
1807
  }
1808
 
1809
  #flags.size16 a[title="Khmer"],
1810
  .tool-container .tool-items a[title="Khmer"] {
1811
+ background:url('../images/flags16.png') -4px -208px no-repeat;
1812
  }
1813
 
1814
  #flags.size16 a[title="Korean"],
1815
  .tool-container .tool-items a[title="Korean"] {
1816
+ background:url('../images/flags16.png') -33px -208px no-repeat;
1817
  }
1818
 
1819
  #flags.size16 a[title="Lao"],
1820
  .tool-container .tool-items a[title="Lao"] {
1821
+ background:url('../images/flags16.png') -62px -208px no-repeat;
1822
  }
1823
 
1824
  #flags.size16 a[title="Latin"],
1825
  .tool-container .tool-items a[title="Latin"] {
1826
+ background:url('../images/flags16.png') -91px -208px no-repeat;
1827
  }
1828
 
1829
  #flags.size16 a[title="Latvian"],
1830
  .tool-container .tool-items a[title="Latvian"] {
1831
+ background:url('../images/flags16.png') -120px -208px no-repeat;
1832
  }
1833
 
1834
  #flags.size16 a[title="Lithuanian"],
1835
  .tool-container .tool-items a[title="Lithuanian"] {
1836
+ background:url('../images/flags16.png') -149px -208px no-repeat;
1837
  }
1838
 
1839
  #flags.size16 a[title="Macedonian"],
1840
  .tool-container .tool-items a[title="Macedonian"] {
1841
+ background:url('../images/flags16.png') -4px -237px no-repeat;
1842
  }
1843
 
1844
  #flags.size16 a[title="Malay"],
1845
  .tool-container .tool-items a[title="Malay"] {
1846
+ background:url('../images/flags16.png') -33px -237px no-repeat;
1847
+ }
1848
+
1849
+ #flags.size16 a[title="Malagasy"],
1850
+ .tool-container .tool-items a[title="Malagasy"] {
1851
+ background:url('../images/flags16.png') -62px -411px no-repeat;
1852
+ }
1853
+
1854
+ #flags.size16 a[title="Malayalam"],
1855
+ .tool-container .tool-items a[title="Malayalam"] {
1856
+ background:url('../images/flags16.png') -120px -411px no-repeat;
1857
  }
1858
 
1859
  #flags.size16 a[title="Maltese"],
1860
  .tool-container .tool-items a[title="Maltese"] {
1861
+ background:url('../images/flags16.png') -62px -237px no-repeat;
1862
  }
1863
 
1864
  #flags.size16 a[title="Maori"],
1865
  .tool-container .tool-items a[title="Maori"] {
1866
+ background:url('../images/flags16.png') -91px -237px no-repeat;
1867
  }
1868
 
1869
  #flags.size16 a[title="Marathi"],
1870
  .tool-container .tool-items a[title="Marathi"] {
1871
+ background:url('../images/flags16.png') -120px -237px no-repeat;
1872
  }
1873
 
1874
  #flags.size16 a[title="Mongolian"],
1875
  .tool-container .tool-items a[title="Mongolian"] {
1876
+ background:url('../images/flags16.png') -149px -237px no-repeat;
1877
+ }
1878
+
1879
+ #flags.size16 a[title="Myanmar(Burmese)"],
1880
+ .tool-container .tool-items a[title="Myanmar(Burmese)"] {
1881
+ background:url('../images/flags16.png') -149px -411px no-repeat;
1882
  }
1883
 
1884
  #flags.size16 a[title="Nepali"],
1885
  .tool-container .tool-items a[title="Nepali"] {
1886
+ background:url('../images/flags16.png') -4px -266px no-repeat;
1887
  }
1888
 
1889
  #flags.size16 a[title="Norwegian"],
1890
  .tool-container .tool-items a[title="Norwegian"] {
1891
+ background:url('../images/flags16.png') -33px -266px no-repeat;
1892
  }
1893
 
1894
  #flags.size16 a[title="Persian"],
1895
  .tool-container .tool-items a[title="Persian"] {
1896
+ background:url('../images/flags16.png') -62px -266px no-repeat;
1897
  }
1898
 
1899
  #flags.size16 a[title="Polish"],
1900
  .tool-container .tool-items a[title="Polish"] {
1901
+ background:url('../images/flags16.png') -91px -266px no-repeat;
1902
  }
1903
 
1904
  #flags.size16 a[title="Portuguese"],
1905
  .tool-container .tool-items a[title="Portuguese"] {
1906
+ background:url('../images/flags16.png') -120px -266px no-repeat;
1907
  }
1908
 
1909
  #flags.size16 a[title="Punjabi"],
1910
  .tool-container .tool-items a[title="Punjabi"] {
1911
+ background:url('../images/flags16.png') -149px -266px no-repeat;
1912
  }
1913
 
1914
  #flags.size16 a[title="Romanian"],
1915
  .tool-container .tool-items a[title="Romanian"] {
1916
+ background:url('../images/flags16.png') -4px -295px no-repeat;
1917
  }
1918
 
1919
  #flags.size16 a[title="Russian"],
1920
  .tool-container .tool-items a[title="Russian"] {
1921
+ background:url('../images/flags16.png') -33px -295px no-repeat;
1922
  }
1923
 
1924
  #flags.size16 a[title="Serbian"],
1925
  .tool-container .tool-items a[title="Serbian"] {
1926
+ background:url('../images/flags16.png') -62px -295px no-repeat;
1927
+ }
1928
+
1929
+ #flags.size16 a[title="Sesotho"],
1930
+ .tool-container .tool-items a[title="Sesotho"] {
1931
+ background:url('../images/flags16.png') -33px -411px no-repeat;
1932
+ }
1933
+
1934
+ #flags.size16 a[title="Sinhala"],
1935
+ .tool-container .tool-items a[title="Sinhala"] {
1936
+ background:url('../images/flags16.png') -4px -440px no-repeat;
1937
  }
1938
 
1939
  #flags.size16 a[title="Slovak"],
1940
  .tool-container .tool-items a[title="Slovak"] {
1941
+ background:url('../images/flags16.png') -91px -295px no-repeat;
1942
  }
1943
 
1944
  #flags.size16 a[title="Slovenian"],
1945
  .tool-container .tool-items a[title="Slovenian"] {
1946
+ background:url('../images/flags16.png') -120px -295px no-repeat;
1947
  }
1948
 
1949
  #flags.size16 a[title="Somali"],
1950
  .tool-container .tool-items a[title="Somali"] {
1951
+ background:url('../images/flags16.png') -149px -295px no-repeat;
1952
  }
1953
 
1954
  #flags.size16 a[title="Spanish"],
1955
  .tool-container .tool-items a[title="Spanish"] {
1956
+ background:url('../images/flags16.png') -4px -324px no-repeat;
1957
  }
1958
 
1959
  #flags.size16 a[title="Swahili"],
1960
  .tool-container .tool-items a[title="Swahili"] {
1961
+ background:url('../images/flags16.png') -33px -324px no-repeat;
1962
  }
1963
 
1964
  #flags.size16 a[title="Swedish"],
1965
  .tool-container .tool-items a[title="Swedish"] {
1966
+ background:url('../images/flags16.png') -62px -324px no-repeat;
1967
+ }
1968
+
1969
+ #flags.size16 a[title="Sundanese"],
1970
+ .tool-container .tool-items a[title="Sundanese"] {
1971
+ background:url('../images/flags16.png') -149px -382px no-repeat;
1972
+ }
1973
+
1974
+ #flags.size16 a[title="Tajik"],
1975
+ .tool-container .tool-items a[title="Tajik"] {
1976
+ background:url('../images/flags16.png') -33px -440px no-repeat;
1977
  }
1978
 
1979
  #flags.size16 a[title="Tamil"],
1980
  .tool-container .tool-items a[title="Tamil"] {
1981
+ background:url('../images/flags16.png') -91px -324px no-repeat;
1982
  }
1983
 
1984
  #flags.size16 a[title="Telugu"],
1985
  .tool-container .tool-items a[title="Telugu"] {
1986
+ background:url('../images/flags16.png') -120px -324px no-repeat;
1987
  }
1988
 
1989
  #flags.size16 a[title="Thai"],
1990
  .tool-container .tool-items a[title="Thai"] {
1991
+ background:url('../images/flags16.png') -149px -324px no-repeat;
1992
  }
1993
 
1994
  #flags.size16 a[title="Turkish"],
1995
  .tool-container .tool-items a[title="Turkish"] {
1996
+ background:url('../images/flags16.png') -33px -353px no-repeat;
1997
  }
1998
 
1999
  #flags.size16 a[title="Ukranian"],
2000
  .tool-container .tool-items a[title="Ukranian"] {
2001
+ background:url('../images/flags16.png') -62px -353px no-repeat;
2002
  }
2003
 
2004
  #flags.size16 a[title="English"],
2005
  .tool-container .tool-items a[title="English"] {
2006
+ background:url('../images/flags16.png') -91px -353px no-repeat;
2007
  }
2008
 
2009
  #flags.size16 a[title="Urdu"],
2010
  .tool-container .tool-items a[title="Urdu"] {
2011
+ background:url('../images/flags16.png') -149px -353px no-repeat;
2012
+ }
2013
+
2014
+ #flags.size16 a[title="Uzbek"],
2015
+ .tool-container .tool-items a[title="Uzbek"] {
2016
+ background:url('../images/flags16.png') -62px -440px no-repeat;
2017
  }
2018
 
2019
  #flags.size16 a[title="Vietnamese"],
2020
  .tool-container .tool-items a[title="Vietnamese"] {
2021
+ background:url('../images/flags16.png') -4px -382px no-repeat;
2022
  }
2023
 
2024
  #flags.size16 a[title="Welsh"],
2025
  .tool-container .tool-items a[title="Welsh"] {
2026
+ background:url('../images/flags16.png') -33px -382px no-repeat;
2027
  }
2028
 
2029
  #flags.size16 a[title="Yiddish"],
2030
  .tool-container .tool-items a[title="Yiddish"] {
2031
+ background:url('../images/flags16.png') -62px -382px no-repeat;
2032
  }
2033
 
2034
  #flags.size16 a[title="Yoruba"],
2035
  .tool-container .tool-items a[title="Yoruba"] {
2036
+ background:url('../images/flags16.png') -91px -382px no-repeat;
2037
  }
2038
 
2039
  #flags.size16 a[title="Zulu"],
2040
  .tool-container .tool-items a[title="Zulu"] {
2041
+ background:url('../images/flags16.png') -120px -382px no-repeat;
2042
  }
2043
 
2044
  /* Individual flag backgrounds (24px) */
2103
  background:url('../images/flags.png') -145px -32px no-repeat;
2104
  }
2105
 
2106
+ #flags.size24 a[title="Chichewa"],
2107
+ .tool-container .tool-items a[title="Chichewa"] {
2108
+ background:url('../images/flags.png') -87px -409px no-repeat;
2109
+ }
2110
+
2111
  #flags.size24 a[title="Chinese"],
2112
  .tool-container .tool-items a[title="Chinese"] {
2113
  background:url('../images/flags.png') 0 -61px no-repeat;
2258
  background:url('../images/flags.png') -145px -177px no-repeat;
2259
  }
2260
 
2261
+ #flags.size24 a[title="Kazakh"],
2262
+ .tool-container .tool-items a[title="Kazakh"] {
2263
+ background:url('../images/flags.png') 0 -409px no-repeat;
2264
+ }
2265
+
2266
  #flags.size24 a[title="Khmer"],
2267
  .tool-container .tool-items a[title="Khmer"] {
2268
  background:url('../images/flags.png') 0 -206px no-repeat;
2298
  background:url('../images/flags.png') 0 -235px no-repeat;
2299
  }
2300
 
2301
+ #flags.size24 a[title="Malagasy"],
2302
+ .tool-container .tool-items a[title="Malagasy"] {
2303
+ background:url('../images/flags.png') -58px -409px no-repeat;
2304
+ }
2305
+
2306
  #flags.size24 a[title="Malay"],
2307
  .tool-container .tool-items a[title="Malay"] {
2308
  background:url('../images/flags.png') -29px -235px no-repeat;
2309
  }
2310
 
2311
+ #flags.size24 a[title="Malayalam"],
2312
+ .tool-container .tool-items a[title="Malayalam"] {
2313
+ background:url('../images/flags.png') -116px -409px no-repeat;
2314
+ }
2315
+
2316
  #flags.size24 a[title="Maltese"],
2317
  .tool-container .tool-items a[title="Maltese"] {
2318
  background:url('../images/flags.png') -58px -235px no-repeat;
2333
  background:url('../images/flags.png') -145px -235px no-repeat;
2334
  }
2335
 
2336
+ #flags.size24 a[title="Myanmar(Burmese)"],
2337
+ .tool-container .tool-items a[title="Myanmar(Burmese)"] {
2338
+ background:url('../images/flags.png') -145px -409px no-repeat;
2339
+ }
2340
+
2341
  #flags.size24 a[title="Nepali"],
2342
  .tool-container .tool-items a[title="Nepali"] {
2343
  background:url('../images/flags.png') 0 -264px no-repeat;
2383
  background:url('../images/flags.png') -58px -293px no-repeat;
2384
  }
2385
 
2386
+ #flags.size24 a[title="Sesotho"],
2387
+ .tool-container .tool-items a[title="Sesotho"] {
2388
+ background:url('../images/flags.png') -29px -409px no-repeat;
2389
+ }
2390
+
2391
+ #flags.size24 a[title="Sinhala"],
2392
+ .tool-container .tool-items a[title="Sinhala"] {
2393
+ background:url('../images/flags.png') 0px -438px no-repeat;
2394
+ }
2395
+
2396
  #flags.size24 a[title="Slovak"],
2397
  .tool-container .tool-items a[title="Slovak"] {
2398
  background:url('../images/flags.png') -87px -293px no-repeat;
2413
  background:url('../images/flags.png') 0 -322px no-repeat;
2414
  }
2415
 
2416
+ #flags.size24 a[title="Sundanese"],
2417
+ .tool-container .tool-items a[title="Sundanese"] {
2418
+ background:url('../images/flags.png') -145px -380px no-repeat;
2419
+ }
2420
+
2421
  #flags.size24 a[title="Swahili"],
2422
  .tool-container .tool-items a[title="Swahili"] {
2423
  background:url('../images/flags.png') -29px -322px no-repeat;
2428
  background:url('../images/flags.png') -58px -322px no-repeat;
2429
  }
2430
 
2431
+ #flags.size24 a[title="Tajik"],
2432
+ .tool-container .tool-items a[title="Tajik"] {
2433
+ background:url('../images/flags.png') -29px -438px no-repeat;
2434
+ }
2435
+
2436
  #flags.size24 a[title="Tamil"],
2437
  .tool-container .tool-items a[title="Tamil"] {
2438
  background:url('../images/flags.png') -87px -322px no-repeat;
2468
  background:url('../images/flags.png') -145px -351px no-repeat;
2469
  }
2470
 
2471
+ #flags.size24 a[title="Uzbek"],
2472
+ .tool-container .tool-items a[title="Uzbek"] {
2473
+ background:url('../images/flags.png') -58px -438px no-repeat;
2474
+ }
2475
+
2476
  #flags.size24 a[title="Vietnamese"],
2477
  .tool-container .tool-items a[title="Vietnamese"] {
2478
  background:url('../images/flags.png') 0 -380px no-repeat;
2496
  #flags.size24 a[title="Zulu"],
2497
  .tool-container .tool-items a[title="Zulu"] {
2498
  background:url('../images/flags.png') -116px -380px no-repeat;
2499
+ }
google-language-translator.php CHANGED
@@ -1,1138 +1,1148 @@
1
- <?php
2
- /*
3
- Plugin Name: Google Language Translator
4
- Plugin URI: http://www.studio88design.com/plugins/google-language-translator
5
- Version: 5.0.02
6
- Description: The MOST SIMPLE Google Translator plugin. This plugin adds Google Translator to your website by using a single shortcode, [google-translator]. Settings include: layout style, hide/show specific languages, hide/show Google toolbar, and hide/show Google branding. Add the shortcode to pages, posts, and widgets.
7
- Author: Rob Myrick
8
- Author URI: http://www.wp-studio.net/
9
- */
10
-
11
- include( plugin_dir_path( __FILE__ ) . 'widget.php');
12
-
13
- class google_language_translator {
14
-
15
- public $languages_array = array (
16
- 'af' => 'Afrikaans',
17
- 'sq' => 'Albanian',
18
- 'ar' => 'Arabic',
19
- 'hy' => 'Armenian',
20
- 'az' => 'Azerbaijani',
21
- 'eu' => 'Basque',
22
- 'be' => 'Belarusian',
23
- 'bn' => 'Bengali',
24
- 'bs' => 'Bosnian',
25
- 'bg' => 'Bulgarian',
26
- 'ca' => 'Catalan',
27
- 'ceb' => 'Cebuano',
28
- 'zh-CN' => 'Chinese',
29
- 'zh-TW' => 'Chinese(Traditional)',
30
- 'hr' => 'Croatian',
31
- 'cs' => 'Czech',
32
- 'da' => 'Danish',
33
- 'nl' => 'Dutch',
34
- 'en' => 'English',
35
- 'eo' => 'Esperanto',
36
- 'et' => 'Estonian',
37
- 'tl' => 'Filipino',
38
- 'fi' => 'Finnish',
39
- 'fr' => 'French',
40
- 'gl' => 'Galician',
41
- 'ka' => 'Georgian',
42
- 'de' => 'German',
43
- 'el' => 'Greek',
44
- 'gu' => 'Gujarati',
45
- 'ht' => 'Haitian',
46
- 'ha' => 'Hausa',
47
- 'iw' => 'Hebrew',
48
- 'hi' => 'Hindi',
49
- 'hmn' => 'Hmong',
50
- 'hu' => 'Hungarian',
51
- 'is' => 'Icelandic',
52
- 'ig' => 'Igbo',
53
- 'id' => 'Indonesian',
54
- 'ga' => 'Irish',
55
- 'it' => 'Italian',
56
- 'ja' => 'Japanese',
57
- 'jw' => 'Javanese',
58
- 'kn' => 'Kannada',
59
- 'km' => 'Khmer',
60
- 'ko' => 'Korean',
61
- 'lo' => 'Lao',
62
- 'la' => 'Latin',
63
- 'lv' => 'Latvian',
64
- 'lt' => 'Lithuanian',
65
- 'mk' => 'Macedonian',
66
- 'ms' => 'Malay',
67
- 'mt' => 'Maltese',
68
- 'mi' => 'Maori',
69
- 'mr' => 'Marathi',
70
- 'mn' => 'Mongolian',
71
- 'ne' => 'Nepali',
72
- 'no' => 'Norwegian',
73
- 'fa' => 'Persian',
74
- 'pl' => 'Polish',
75
- 'pt' => 'Portuguese',
76
- 'pa' => 'Punjabi',
77
- 'ro' => 'Romanian',
78
- 'ru' => 'Russian',
79
- 'sr' => 'Serbian',
80
- 'sk' => 'Slovak',
81
- 'sl' => 'Slovenian',
82
- 'so' => 'Somali',
83
- 'es' => 'Spanish',
84
- 'sw' => 'Swahili',
85
- 'sv' => 'Swedish',
86
- 'ta' => 'Tamil',
87
- 'te' => 'Telugu',
88
- 'th' => 'Thai',
89
- 'tr' => 'Turkish',
90
- 'uk' => 'Ukranian',
91
- 'ur' => 'Urdu',
92
- 'vi' => 'Vietnamese',
93
- 'cy' => 'Welsh',
94
- 'yi' => 'Yiddish',
95
- 'yo' => 'Yoruba',
96
- 'zu' => 'Zulu'
97
- );
98
-
99
- public function __construct() {
100
- register_activation_hook( __FILE__, array( &$this, 'glt_activate' ));
101
- register_uninstall_hook( __FILE__, 'glt_deactivate' );
102
- add_action( 'admin_menu', array( &$this, 'add_my_admin_menus'));
103
- add_action('admin_init',array(&$this, 'initialize_settings'));
104
- add_action('wp_head',array(&$this, 'load_css'));
105
- add_action('wp_footer',array(&$this, 'footer_script'));
106
- add_shortcode( 'google-translator',array(&$this, 'google_translator_shortcode'));
107
- add_shortcode( 'glt', array(&$this, 'google_translator_menu_language'));
108
- add_filter('widget_text','do_shortcode');
109
- add_filter('walker_nav_menu_start_el', array(&$this,'menu_shortcodes') , 10 , 2);
110
- add_filter( 'plugin_action_links_' . plugin_basename(__FILE__), array(&$this, 'glt_settings_link') );
111
-
112
- if (!is_admin()) {
113
- add_action('init',array(&$this, 'flags'));
114
- }
115
- }
116
-
117
- public function glt_activate() {
118
- add_option('googlelanguagetranslator_active', 1);
119
- add_option('googlelanguagetranslator_language','en');
120
- add_option('googlelanguagetranslator_language_option','all');
121
- add_option('googlelanguagetranslator_flags','show_flags');
122
- add_option('language_display_settings',array ('en' => 1));
123
- add_option('flag_display_settings',array ('flag-en' => 1));
124
- add_option('googlelanguagetranslator_translatebox','yes');
125
- add_option('googlelanguagetranslator_display','Vertical');
126
- add_option('googlelanguagetranslator_toolbar','Yes');
127
- add_option('googlelanguagetranslator_showbranding','Yes');
128
- add_option('googlelanguagetranslator_flags_alignment','flags_left');
129
- add_option('googlelanguagetranslator_analytics', 0);
130
- add_option('googlelanguagetranslator_analytics_id','');
131
- add_option('googlelanguagetranslator_css','');
132
- add_option('googlelanguagetranslator_manage_translations',0);
133
- add_option('googlelanguagetranslator_multilanguage',0);
134
- add_option('googlelanguagetranslator_floating_widget','yes');
135
- add_option('googlelanguagetranslator_flag_size','18');
136
- add_option('googlelanguagetranslator_flags_order','');
137
- }
138
-
139
- public function glt_deactivate() {
140
- delete_option('googlelanguagetranslator_active', 1);
141
- delete_option('googlelanguagetranslator_language','en');
142
- delete_option('googlelanguagetranslator_language_option','all');
143
- delete_option('googlelanguagetranslator_flags','show_flags');
144
- delete_option('language_display_settings',array ('en' => 1));
145
- delete_option('flag_display_settings',array ('flag-en' => 1));
146
- delete_option('googlelanguagetranslator_translatebox','yes');
147
- delete_option('googlelanguagetranslator_display','Vertical');
148
- delete_option('googlelanguagetranslator_toolbar','Yes');
149
- delete_option('googlelanguagetranslator_showbranding','Yes');
150
- delete_option('googlelanguagetranslator_flags_alignment','flags_left');
151
- delete_option('googlelanguagetranslator_analytics',1);
152
- delete_option('googlelanguagetranslator_analytics_id','');
153
- delete_option('googlelanguagetranslator_css','');
154
- delete_option('googlelanguagetranslator_manage_translations',0);
155
- delete_option('googlelanguagetranslator_multilanguage',0);
156
- delete_option('googlelanguagetranslator_floating_widget','yes');
157
- delete_option('googlelanguagetranslator_flag_size','18');
158
- delete_option('googlelanguagetranslator_flags_order','');
159
- }
160
-
161
- public function glt_settings_link ( $links ) {
162
- $settings_link = array(
163
- '<a href="' . admin_url( 'options-general.php?page=google_language_translator' ) . '">Settings</a>',
164
- );
165
- return array_merge( $links, $settings_link );
166
- }
167
-
168
- public function add_my_admin_menus(){
169
- $p = add_options_page('Google Language Translator', 'Google Language Translator', 'manage_options', 'google_language_translator', array(&$this, 'page_layout_cb'));
170
-
171
- add_action( 'load-' . $p, array(&$this, 'load_admin_js' ));
172
- }
173
-
174
- public function load_admin_js(){
175
- add_action( 'admin_enqueue_scripts', array(&$this, 'enqueue_admin_js' ));
176
- add_action('admin_footer',array(&$this, 'footer_script'));
177
- }
178
-
179
- public function enqueue_admin_js(){
180
- wp_enqueue_script( 'my-admin-script', plugins_url('js/admin.js',__FILE__), array('jquery'));
181
- wp_enqueue_script( 'my-flag-script', plugins_url('js/flags.js',__FILE__), array('jquery'));
182
-
183
- if (get_option ('googlelanguagetranslator_floating_widget') == 'yes') {
184
- wp_enqueue_script( 'my-toolbar-script', plugins_url('js/toolbar.js',__FILE__), array('jquery'));
185
- wp_enqueue_script( 'my-load-toolbar-script', plugins_url('js/load-toolbar.js',__FILE__), array('jquery'));
186
- wp_register_style( 'toolbar.css', plugins_url('css/toolbar.css', __FILE__) );
187
- wp_enqueue_style( 'toolbar.css' );
188
- }
189
-
190
- wp_enqueue_script( 'jquery-ui-core');
191
- wp_enqueue_script( 'jquery-ui-sortable');
192
- wp_enqueue_script( 'load_sortable_flags', plugins_url('js/load-sortable-flags.js',__FILE__), array('jquery'));
193
- wp_register_style( 'jquery-ui.css', plugins_url('css/jquery-ui.css',__FILE__) );
194
- wp_register_style( 'style.css', plugins_url('css/style.css', __FILE__) );
195
- wp_enqueue_style( 'style.css' );
196
- //wp_enqueue_style( 'jquery-ui.css' );
197
- }
198
-
199
- public function flags() {
200
- wp_enqueue_script( 'flags', plugins_url('js/flags.js',__FILE__), array('jquery'));
201
-
202
- if (get_option ('googlelanguagetranslator_floating_widget') == 'yes') {
203
- wp_enqueue_script( 'my-toolbar-script', plugins_url('js/toolbar.js',__FILE__), array('jquery'));
204
- wp_enqueue_script( 'my-load-toolbar-script', plugins_url('js/load-toolbar.js',__FILE__), array('jquery'));
205
- wp_register_style( 'toolbar.css', plugins_url('css/toolbar.css', __FILE__) );
206
- wp_enqueue_style( 'toolbar.css' );
207
- }
208
-
209
- wp_register_style( 'style.css', plugins_url('css/style.css', __FILE__) );
210
- wp_enqueue_style( 'style.css' );
211
- }
212
-
213
- public function load_css() {
214
- include( plugin_dir_path( __FILE__ ) . '/css/style.php');
215
- }
216
-
217
- public function google_translator_shortcode() {
218
-
219
- if (get_option('googlelanguagetranslator_display')=='Vertical'){
220
- return $this->googlelanguagetranslator_vertical();
221
- }
222
- elseif(get_option('googlelanguagetranslator_display')=='Horizontal'){
223
- return $this->googlelanguagetranslator_horizontal();
224
- }
225
- }
226
-
227
- public function googlelanguagetranslator_included_languages() {
228
- if ( get_option('googlelanguagetranslator_language_option')=='specific') {
229
- $get_language_choices = get_option ('language_display_settings');
230
-
231
- foreach ($get_language_choices as $key=>$value) {
232
- if($value == 1) {
233
- $items[] = $key;
234
- }
235
- }
236
-
237
- $comma_separated = implode(",",array_values($items));
238
-
239
- if ( get_option('googlelanguagetranslator_display') == 'Vertical') {
240
- $lang = ", includedLanguages:'".$comma_separated."'";
241
- return $lang;
242
- } elseif ( get_option('googlelanguagetranslator_display') == 'Horizontal') {
243
- $lang = ", includedLanguages:'".$comma_separated."'";
244
- return $lang;
245
- }
246
- }
247
- }
248
-
249
- public function analytics() {
250
- if ( get_option('googlelanguagetranslator_analytics') == 1 ) {
251
- $analytics_id = get_option('googlelanguagetranslator_analytics_id');
252
- $analytics = "gaTrack: true, gaId: '".$analytics_id."'";
253
-
254
- if (!empty ($analytics_id) ):
255
- return ', '.$analytics;
256
- endif;
257
- }
258
- }
259
-
260
- public function menu_shortcodes( $item_output,$item ) {
261
- if ( !empty($item->description)) {
262
- $output = do_shortcode($item->description);
263
-
264
- if ( $output != $item->description )
265
- $item_output = $output;
266
- }
267
- return $item_output;
268
- }
269
-
270
- public function google_translator_menu_language($atts, $content = '') {
271
- extract(shortcode_atts(array(
272
- "language" => 'Spanish',
273
- "label" => 'Spanish'
274
- ), $atts));
275
-
276
- $default_language = get_option('googlelanguagetranslator_language');
277
- $language_code = array_search($language,$this->languages_array);
278
-
279
- return "<a class='nturl notranslate ".$language_code." single-language flag' title='".$language."'>".$label."</a>";
280
- }
281
-
282
- public function footer_script() {
283
- global $shortcode_started;
284
- $default_language = get_option('googlelanguagetranslator_language');
285
- $language_choices = $this->googlelanguagetranslator_included_languages();
286
- $get_language_option = get_option('googlelanguagetranslator_language_option');
287
- $get_flag_choices = get_option ('flag_display_settings');
288
- $floating_widget = get_option ('googlelanguagetranslator_floating_widget');
289
- $is_active = get_option ( 'googlelanguagetranslator_active' );
290
- $is_multilanguage = get_option('googlelanguagetranslator_multilanguage');
291
- $auto_display = ', autoDisplay: false';
292
- $str = ''; ?>
293
- <script>jQuery(document).ready(function(a){a("a.nturl").on("click",function(){function l(){doGoogleLanguageTranslator(default_lang+"|"+default_lang)}function n(){doGoogleLanguageTranslator(default_lang+"|"+lang_prefix)}default_lang="<?php echo get_option('googlelanguagetranslator_language'); ?>",lang_prefix=a(this).attr("class").split(" ")[2],lang_prefix==default_lang?l():n()}),a("a.flag").on("click",function(){function l(){doGoogleLanguageTranslator(default_lang+"|"+default_lang)}function n(){doGoogleLanguageTranslator(default_lang+"|"+lang_prefix)}default_lang="<?php echo get_option('googlelanguagetranslator_language'); ?>",lang_prefix=a(this).attr("class").split(" ")[2],a(".tool-container").hide(),lang_prefix==default_lang?l():n()}),0==a("body > #google_language_translator").length&&a("#glt-footer").html("<div id='google_language_translator'></div>")});</script>
294
-
295
- <?php
296
-
297
- if( $is_active == 1) {
298
-
299
- foreach ($get_flag_choices as $flag_choice_key) {}
300
-
301
- if ($floating_widget=='yes' && $get_language_option != 'specific') {
302
- $str.='<div id="glt-translate-trigger"><span class="notranslate">Translate &raquo;</span></div>';
303
- $str.='<div id="glt-toolbar"></div>';
304
- } //endif $floating_widget
305
-
306
- if ($shortcode_started != 'true') {
307
- $str.='<div id="flags" style="display:none">';
308
- $str.='<ul id="sortable" class="ui-sortable">';
309
-
310
- if ((empty($new_languages_array_string)) || ($new_languages_array_count != $get_flag_choices_count)) {
311
- foreach ($this->languages_array as $key=>$value) {
312
- $language_code = $key;
313
- $language_name = $value;
314
- $language_name_flag = $language_name;
315
- if ($flag_choice_key == '1') {
316
- if ( isset ( $get_flag_choices['flag-'.$language_code.''] ) ) {
317
- $str.="<li id='".$language_name."'><a title='".$language_name."' class='notranslate flag ".$language_code."'></a></li>";
318
- }
319
- } //$key
320
- }//foreach
321
- } else {
322
- foreach ($new_languages_array_codes as $value) {
323
- $language_name = $value;
324
- $language_code = array_search ($language_name,$this->languages_array);
325
- $language_name_flag = $language_name;
326
- if ($flag_choice_key == '1') {
327
- if (in_array($language_name,$this->languages_array)) {
328
- if ( isset ( $get_flag_choices['flag-'.$language_code.''] ) ) {
329
- $str.="<li id='".$language_name."'><a title='".$language_name."' class='notranslate flag ".$language_code."'></a></li>";
330
- } //isset
331
- } //in_array
332
- }//flag_choice_key
333
- }//foreach
334
- }//endif
335
- $str.='</ul>';
336
- $str.='</div>';
337
- }
338
- }
339
-
340
- $language_choices = $this->googlelanguagetranslator_included_languages();
341
- $layout = get_option('googlelanguagetranslator_display');
342
- $is_multilanguage = get_option('googlelanguagetranslator_multilanguage');
343
- $horizontal_layout = ', layout: google.translate.TranslateElement.InlineLayout.HORIZONTAL';
344
- $auto_display = ', autoDisplay: false';
345
- $default_language = get_option('googlelanguagetranslator_language');
346
-
347
- if ($is_multilanguage == 1) {
348
- $multilanguagePage = ', multilanguagePage:true';
349
- $str.="<div id='glt-footer'></div><script type='text/javascript'>function GoogleLanguageTranslatorInit() { new google.translate.TranslateElement({pageLanguage: '".$default_language."'".$language_choices . ($layout=='Horizontal' ? $horizontal_layout : '') . $auto_display . $multilanguagePage . $this->analytics()."}, 'google_language_translator');}</script>";
350
- $str.="<script type='text/javascript' src='//translate.google.com/translate_a/element.js?cb=GoogleLanguageTranslatorInit'></script>";
351
- echo $str;
352
-
353
- } elseif ($is_multilanguage == 0) {
354
- $str.="<div id='glt-footer'></div><script type='text/javascript'>function GoogleLanguageTranslatorInit() { new google.translate.TranslateElement({pageLanguage: '".$default_language."'".$language_choices . ($layout=='Horizontal' ? $horizontal_layout : '') . $auto_display . $this->analytics()."}, 'google_language_translator');}</script>";
355
- $str.="<script type='text/javascript' src='//translate.google.com/translate_a/element.js?cb=GoogleLanguageTranslatorInit'></script>";
356
- echo $str;
357
- }
358
- }
359
-
360
- public function googlelanguagetranslator_vertical() {
361
-
362
- global $shortcode_started;
363
-
364
- $shortcode_started = 'true';
365
- $get_flag_choices = get_option ('flag_display_settings');
366
- $new_languages_array_string = get_option('googlelanguagetranslator_flags_order');
367
- $new_languages_array = explode(",",$new_languages_array_string);
368
- $new_languages_array_codes = array_values($new_languages_array);
369
- $new_languages_array_count = count($new_languages_array);
370
- $get_flag_choices_count = count($get_flag_choices);
371
- $get_language_choices = get_option ('language_display_settings');
372
- $flag_width = get_option('googlelanguagetranslator_flag_size');
373
- $default_language_code = get_option('googlelanguagetranslator_language');
374
- $is_active = get_option ( 'googlelanguagetranslator_active' );
375
- $get_language_option = get_option('googlelanguagetranslator_language_option');
376
- $language_choices = $this->googlelanguagetranslator_included_languages();
377
- $floating_widget = get_option ('googlelanguagetranslator_floating_widget');
378
- $str = '';
379
-
380
- if( $is_active == 1){
381
-
382
- foreach ($get_flag_choices as $flag_choice_key) {}
383
-
384
- $str.='<div id="flags" class="size'.$flag_width.'">';
385
- $str.='<ul id="sortable" class="ui-sortable" style="float:left">';
386
-
387
- if ((empty($new_languages_array_string)) || ($new_languages_array_count != $get_flag_choices_count)) {
388
- foreach ($this->languages_array as $key=>$value) {
389
- $language_code = $key;
390
- $language_name = $value;
391
- $language_name_flag = $language_name;
392
- if ($flag_choice_key == '1') {
393
- if ( isset ( $get_flag_choices['flag-'.$language_code.''] ) ) {
394
- $str.="<li id='".$language_name."'><a title='".$language_name."' class='notranslate flag ".$language_code."'></a></li>";
395
- }
396
- } //$key
397
- }//foreach
398
- } else {
399
- foreach ($new_languages_array_codes as $value) {
400
- $language_name = $value;
401
- $language_code = array_search ($language_name,$this->languages_array);
402
- $language_name_flag = $language_name;
403
- if ($flag_choice_key == '1') {
404
- if (in_array($language_name,$this->languages_array)) {
405
- if ( isset ( $get_flag_choices['flag-'.$language_code.''] ) ) {
406
- $str.="<li id='".$language_name."'><a title='".$language_name."' class='notranslate flag ".$language_code."'></a></li>";
407
- } //isset
408
- } //in_array
409
- }//flag_choice_key
410
- }//foreach
411
- }//endif
412
- $str.='</ul>';
413
- $str.='</div>';
414
- $str.='<div id="google_language_translator"></div>';
415
- return $str;
416
- } //End is_active
417
- } // End glt_vertical
418
-
419
- public function googlelanguagetranslator_horizontal(){
420
- $shortcode_started = true;
421
- $get_flag_choices = get_option ('flag_display_settings');
422
- $new_languages_array_string = get_option('googlelanguagetranslator_flags_order');
423
- $new_languages_array = explode(",",$new_languages_array_string);
424
- $new_languages_array_codes = array_values($new_languages_array);
425
- $new_languages_array_count = count($new_languages_array);
426
- $get_flag_choices_count = count($get_flag_choices);
427
- $get_language_choices = get_option ('language_display_settings');
428
- $flag_width = get_option('googlelanguagetranslator_flag_size');
429
- $default_language_code = get_option('googlelanguagetranslator_language');
430
- $is_active = get_option ( 'googlelanguagetranslator_active' );
431
- $get_language_option = get_option('googlelanguagetranslator_language_option');
432
- $language_choices = $this->googlelanguagetranslator_included_languages();
433
- $floating_widget = get_option ('googlelanguagetranslator_floating_widget');
434
- $str = '';
435
-
436
- if( $is_active == 1) {
437
- foreach ($get_flag_choices as $flag_choice_key) {}
438
-
439
- $str.='<div id="flags" class="size'.$flag_width.'">';
440
- $str.='<ul id="sortable" class="ui-sortable" style="float:left">';
441
-
442
- if ((empty($new_languages_array_string)) || ($new_languages_array_count != $get_flag_choices_count)) {
443
- foreach ($this->languages_array as $key=>$value) {
444
- $language_code = $key;
445
- $language_name = $value;
446
- $language_name_flag = $language_name;
447
-
448
- if ($flag_choice_key == '1') {
449
- if ( isset ( $get_flag_choices['flag-'.$language_code.''] ) ) {
450
- $str.="<li id='".$language_name."'><a title='".$language_name."' class='notranslate flag ".$language_code."'></a></li>";
451
- }
452
- } //$key
453
- }//foreach
454
-
455
- } else {
456
-
457
- foreach ($new_languages_array_codes as $value) {
458
- $language_name = $value;
459
- $language_code = array_search ($language_name,$this->languages_array);
460
- $language_name_flag = $language_name;
461
- if ($flag_choice_key == '1') {
462
- if (in_array($language_name,$this->languages_array)) {
463
- if ( isset ( $get_flag_choices['flag-'.$language_code.''] ) ) {
464
- $str.="<li id='".$language_name."'><a title='".$language_name."' class='notranslate flag ".$language_code."'></a></li>";
465
- } //isset
466
- } //in_array
467
- }//flag_choice_key
468
- }//foreach
469
- }//endif
470
- $str.='</ul>';
471
- $str.='</div>';
472
- $str.='<div id="google_language_translator"></div>';
473
- return $str;
474
- }
475
- } // End glt_horizontal
476
-
477
- public function initialize_settings() {
478
- add_settings_section('glt_settings','Settings','','google_language_translator');
479
-
480
- $settings_name_array = array (
481
- 'googlelanguagetranslator_active','googlelanguagetranslator_language','googlelanguagetranslator_language_option','language_display_settings','googlelanguagetranslator_flags','flag_display_settings','googlelanguagetranslator_translatebox','googlelanguagetranslator_display','googlelanguagetranslator_toolbar','googlelanguagetranslator_showbranding','googlelanguagetranslator_flags_alignment','googlelanguagetranslator_analytics','googlelanguagetranslator_analytics_id','googlelanguagetranslator_css','googlelanguagetranslator_manage_translations','googlelanguagetranslator_multilanguage','googlelanguagetranslator_floating_widget','googlelanguagetranslator_flag_size','googlelanguagetranslator_flags_order','googlelanguagetranslator_exclude_translation'
482
- );
483
-
484
- $settings_callback_array = array ( 'googlelanguagetranslator_active_cb','googlelanguagetranslator_language_cb','googlelanguagetranslator_language_option_cb','language_display_settings_cb','googlelanguagetranslator_flags_cb','flag_display_settings_cb','googlelanguagetranslator_translatebox_cb','googlelanguagetranslator_display_cb','googlelanguagetranslator_toolbar_cb','googlelanguagetranslator_showbranding_cb','googlelanguagetranslator_flags_alignment_cb','googlelanguagetranslator_analytics_cb','googlelanguagetranslator_analytics_id_cb','googlelanguagetranslator_css_cb','googlelanguagetranslator_manage_translations_cb','googlelanguagetranslator_multilanguage_cb','googlelanguagetranslator_floating_widget_cb','googlelanguagetranslator_flag_size_cb','googlelanguagetranslator_flags_order_cb','googlelanguagetranslator_exclude_translation_cb'
485
- );
486
-
487
- foreach ($settings_name_array as $setting) {
488
- add_settings_field( $setting,'',$setting.'_cb','google_language_translator','glt_settings');
489
- register_setting( 'google_language_translator',$setting);
490
- }
491
- }
492
-
493
- public function googlelanguagetranslator_active_cb() {
494
- $option_name = 'googlelanguagetranslator_active' ;
495
- $new_value = 1;
496
- if ( get_option( $option_name ) === false ) {
497
-
498
- // The option does not exist, so we update it.
499
- update_option( $option_name, $new_value );
500
- }
501
-
502
- $options = get_option (''.$option_name.'');
503
-
504
- $html = '<input type="checkbox" name="googlelanguagetranslator_active" id="googlelanguagetranslator_active" value="1" '.checked(1,$options,false).'/> &nbsp; Check this box to activate';
505
- echo $html;
506
- }
507
-
508
- public function googlelanguagetranslator_language_cb() {
509
-
510
- $option_name = 'googlelanguagetranslator_language';
511
- $new_value = 'en';
512
-
513
- if ( get_option( $option_name ) === false ) {
514
-
515
- // The option does not exist, so we update it.
516
- update_option( $option_name, $new_value );
517
- }
518
-
519
- $options = get_option (''.$option_name.''); ?>
520
-
521
- <select name="googlelanguagetranslator_language" id="googlelanguagetranslator_language">
522
-
523
- <?php
524
-
525
- foreach ($this->languages_array as $key => $value) {
526
- $language_code = $key;
527
- $language_name = $value; ?>
528
- <option value="<?php echo $language_code; ?>" <?php if($options==''.$language_code.''){echo "selected";}?>><?php echo $language_name; ?></option>
529
- <?php } ?>
530
- </select>
531
- <?php
532
- }
533
-
534
- public function googlelanguagetranslator_language_option_cb() {
535
-
536
- $option_name = 'googlelanguagetranslator_language_option' ;
537
- $new_value = 'all';
538
-
539
- if ( get_option( $option_name ) === false ) {
540
-
541
- // The option does not exist, so we update it.
542
- update_option( $option_name, $new_value );
543
- }
544
-
545
- $options = get_option (''.$option_name.''); ?>
546
-
547
- <input type="radio" name="googlelanguagetranslator_language_option" id="googlelanguagetranslator_language_option" value="all" <?php if($options=='all'){echo "checked";}?>/> All Languages<br/>
548
- <input type="radio" name="googlelanguagetranslator_language_option" id="googlelanguagetranslator_language_option" value="specific" <?php if($options=='specific'){echo "checked";}?>/> Specific Languages
549
- <?php
550
- }
551
-
552
- public function language_display_settings_cb() {
553
- $default_language_code = get_option('googlelanguagetranslator_language');
554
- $option_name = 'language_display_settings';
555
- $new_value = array(''.$default_language_code.'' => 1);
556
-
557
- if ( get_option( $option_name ) == false ) {
558
- // The option does not exist, so we update it.
559
- update_option( $option_name, $new_value );
560
- }
561
-
562
- $get_language_choices = get_option (''.$option_name.'');
563
-
564
- foreach ($this->languages_array as $key => $value) {
565
- $language_code = $key;
566
- $language_name = $value;
567
- $language_code_array[] = $key;
568
-
569
- if (!isset($get_language_choices[''.$language_code.''])) {
570
- $get_language_choices[''.$language_code.''] = 0;
571
- }
572
-
573
- $items[] = $get_language_choices[''.$language_code.''];
574
- $language_codes = $language_code_array;
575
- $item_count = count($items);
576
-
577
- if ($item_count == 1 || $item_count == 22 || $item_count == 43 || $item_count == 64) { ?>
578
- <div class="languages" style="width:25%; float:left">
579
- <?php } ?>
580
- <div><input type="checkbox" name="language_display_settings[<?php echo $language_code; ?>]" value="1"<?php checked( 1,$get_language_choices[''.$language_code.'']); ?>/><?php echo $language_name; ?></div>
581
- <?php
582
- if ($item_count == 21 || $item_count == 42 || $item_count == 63 || $item_count == 81) { ?>
583
- </div>
584
- <?php }
585
- } ?>
586
- <div class="clear"></div>
587
- <?php
588
- }
589
-
590
- public function googlelanguagetranslator_flags_cb() {
591
-
592
- $option_name = 'googlelanguagetranslator_flags' ;
593
- $new_value = 'show_flags';
594
-
595
- if ( get_option( $option_name ) === false ) {
596
-
597
- // The option does not exist, so we update it.
598
- update_option( $option_name, $new_value );
599
- }
600
-
601
- $options = get_option (''.$option_name.''); ?>
602
-
603
- <input type="radio" name="googlelanguagetranslator_flags" id="googlelanguagetranslator_flags" value="show_flags" <?php if($options=='show_flags'){echo "checked";}?>/> Yes, show flag images<br/>
604
- <input type="radio" name="googlelanguagetranslator_flags" id="googlelanguagetranslator_flags" value="hide_flags" <?php if($options=='hide_flags'){echo "checked";}?>/> No, hide flag images
605
- <?php
606
- }
607
-
608
- public function flag_display_settings_cb() {
609
- $default_language_code = get_option('googlelanguagetranslator_language');
610
- $option_name = 'flag_display_settings';
611
- $new_value = array('flag-'.$default_language_code.'' => 1);
612
-
613
- if ( get_option( $option_name ) == false ) {
614
- // The option does not exist, so we update it.
615
- update_option( $option_name, $new_value );
616
- }
617
-
618
- $get_flag_choices = get_option (''.$option_name.'');
619
-
620
- foreach ($this->languages_array as $key => $value) {
621
- $language_code = $key;
622
- $language_name = $value;
623
- $language_code_array[] = $key;
624
-
625
- if (!isset($get_flag_choices['flag-'.$language_code.''])) {
626
- $get_flag_choices['flag-'.$language_code.''] = 0;
627
- }
628
-
629
- $items[] = $get_flag_choices['flag-'.$language_code.''];
630
- $language_codes = $language_code_array;
631
- $item_count = count($items);
632
-
633
- if ($item_count == 1 || $item_count == 22 || $item_count == 43 || $item_count == 64) { ?>
634
- <div class="flagdisplay" style="width:25%; float:left">
635
- <?php } ?>
636
- <div><input type="checkbox" name="flag_display_settings[flag-<?php echo $language_code; ?>]" value="1"<?php checked( 1,$get_flag_choices['flag-'.$language_code.'']); ?>/><?php echo $language_name; ?></div>
637
- <?php
638
- if ($item_count == 21 || $item_count == 42 || $item_count == 63 || $item_count == 81) { ?>
639
- </div>
640
- <?php }
641
- } ?>
642
- <div class="clear"></div>
643
- <?php
644
- }
645
-
646
- public function googlelanguagetranslator_floating_widget_cb() {
647
-
648
- $option_name = 'googlelanguagetranslator_floating_widget' ;
649
- $new_value = 'yes';
650
-
651
- if ( get_option( $option_name ) === false ) {
652
-
653
- // The option does not exist, so we update it.
654
- update_option( $option_name, $new_value );
655
- }
656
-
657
- $options = get_option (''.$option_name.''); ?>
658
-
659
- <select name="googlelanguagetranslator_floating_widget" id="googlelanguagetranslator_floating_widget" style="width:170px">
660
- <option value="yes" <?php if($options=='yes'){echo "selected";}?>>Yes, show widget</option>
661
- <option value="no" <?php if($options=='no'){echo "selected";}?>>No, hide widget</option>
662
- </select>
663
- <?php }
664
-
665
- public function googlelanguagetranslator_translatebox_cb() {
666
-
667
- $option_name = 'googlelanguagetranslator_translatebox' ;
668
- $new_value = 'yes';
669
-
670
- if ( get_option( $option_name ) === false ) {
671
-
672
- // The option does not exist, so we update it.
673
- update_option( $option_name, $new_value );
674
- }
675
-
676
- $options = get_option (''.$option_name.''); ?>
677
-
678
- <select name="googlelanguagetranslator_translatebox" id="googlelanguagetranslator_translatebox" style="width:190px">
679
- <option value="yes" <?php if($options=='yes'){echo "selected";}?>>Yes, show language box</option>
680
- <option value="no" <?php if($options=='no'){echo "selected";}?>>No, hide language box</option>
681
- </select>
682
- <?php }
683
-
684
- public function googlelanguagetranslator_display_cb() {
685
-
686
- $option_name = 'googlelanguagetranslator_display' ;
687
- $new_value = 'Vertical';
688
-
689
- if ( get_option( $option_name ) === false ) {
690
-
691
- // The option does not exist, so we update it.
692
- update_option( $option_name, $new_value );
693
- }
694
-
695
- $options = get_option (''.$option_name.''); ?>
696
-
697
- <select name="googlelanguagetranslator_display" id="googlelanguagetranslator_display" style="width:170px;">
698
- <option value="Vertical" <?php if(get_option('googlelanguagetranslator_display')=='Vertical'){echo "selected";}?>>Vertical</option>
699
- <option value="Horizontal" <?php if(get_option('googlelanguagetranslator_display')=='Horizontal'){echo "selected";}?>>Horizontal</option>
700
- </select>
701
- <?php }
702
-
703
- public function googlelanguagetranslator_toolbar_cb() {
704
-
705
- $option_name = 'googlelanguagetranslator_toolbar' ;
706
- $new_value = 'Yes';
707
-
708
- if ( get_option( $option_name ) === false ) {
709
-
710
- // The option does not exist, so we update it.
711
- update_option( $option_name, $new_value );
712
- }
713
-
714
- $options = get_option (''.$option_name.''); ?>
715
-
716
- <select name="googlelanguagetranslator_toolbar" id="googlelanguagetranslator_toolbar" style="width:170px;">
717
- <option value="Yes" <?php if(get_option('googlelanguagetranslator_toolbar')=='Yes'){echo "selected";}?>>Yes</option>
718
- <option value="No" <?php if(get_option('googlelanguagetranslator_toolbar')=='No'){echo "selected";}?>>No</option>
719
- </select>
720
- <?php }
721
-
722
- public function googlelanguagetranslator_showbranding_cb() {
723
-
724
- $option_name = 'googlelanguagetranslator_showbranding' ;
725
- $new_value = 'Yes';
726
-
727
- if ( get_option( $option_name ) === false ) {
728
-
729
- // The option does not exist, so we update it.
730
- update_option( $option_name, $new_value );
731
- }
732
-
733
- $options = get_option (''.$option_name.''); ?>
734
-
735
- <select name="googlelanguagetranslator_showbranding" id="googlelanguagetranslator_showbranding" style="width:170px;">
736
- <option value="Yes" <?php if(get_option('googlelanguagetranslator_showbranding')=='Yes'){echo "selected";}?>>Yes</option>
737
- <option value="No" <?php if(get_option('googlelanguagetranslator_showbranding')=='No'){echo "selected";}?>>No</option>
738
- </select>
739
- <?php }
740
-
741
- public function googlelanguagetranslator_flags_alignment_cb() {
742
-
743
- $option_name = 'googlelanguagetranslator_flags_alignment' ;
744
- $new_value = 'flags_left';
745
-
746
- if ( get_option( $option_name ) === false ) {
747
-
748
- // The option does not exist, so we update it.
749
- update_option( $option_name, 'flags_left' );
750
- }
751
-
752
- $options = get_option (''.$option_name.''); ?>
753
-
754
- <input type="radio" name="googlelanguagetranslator_flags_alignment" id="flags_left" value="flags_left" <?php if($options=='flags_left'){echo "checked";}?>/> Align Left<br/>
755
- <input type="radio" name="googlelanguagetranslator_flags_alignment" id="flags_right" value="flags_right" <?php if($options=='flags_right'){echo "checked";}?>/> Align Right
756
- <?php }
757
-
758
- public function googlelanguagetranslator_analytics_cb() {
759
-
760
- $option_name = 'googlelanguagetranslator_analytics' ;
761
- $new_value = 0;
762
-
763
- if ( get_option( $option_name ) === false ) {
764
-
765
- // The option does not exist, so we update it.
766
- update_option( $option_name, $new_value );
767
- }
768
-
769
- $options = get_option (''.$option_name.'');
770
-
771
- $html = '<input type="checkbox" name="googlelanguagetranslator_analytics" id="googlelanguagetranslator_analytics" value="1" '.checked(1,$options,false).'/> &nbsp; Activate Google Analytics tracking?';
772
- echo $html;
773
- }
774
-
775
- public function googlelanguagetranslator_analytics_id_cb() {
776
-
777
- $option_name = 'googlelanguagetranslator_analytics_id' ;
778
- $new_value = '';
779
-
780
- if ( get_option( $option_name ) === false ) {
781
-
782
- // The option does not exist, so we update it.
783
- update_option( $option_name, $new_value );
784
- }
785
-
786
- $options = get_option (''.$option_name.'');
787
-
788
- $html = '<input type="text" name="googlelanguagetranslator_analytics_id" id="googlelanguagetranslator_analytics_id" value="'.$options.'" />';
789
- echo $html;
790
- }
791
-
792
- public function googlelanguagetranslator_flag_size_cb() {
793
-
794
- $option_name = 'googlelanguagetranslator_flag_size' ;
795
- $new_value = '18';
796
-
797
- if ( get_option( $option_name ) === false ) {
798
-
799
- // The option does not exist, so we update it.
800
- update_option( $option_name, $new_value );
801
- }
802
-
803
- $options = get_option (''.$option_name.''); ?>
804
-
805
- <select name="googlelanguagetranslator_flag_size" id="googlelanguagetranslator_flag_size" style="width:110px;">
806
- <option value="16" <?php if($options=='16'){echo "selected";}?>>16px</option>
807
- <option value="18" <?php if($options=='18'){echo "selected";}?>>18px</option>
808
- <option value="20" <?php if($options=='20'){echo "selected";}?>>20px</option>
809
- <option value="22" <?php if($options=='22'){echo "selected";}?>>22px</option>
810
- <option value="24" <?php if($options=='24'){echo "selected";}?>>24px</option>
811
- </select>
812
- <?php }
813
-
814
- public function googlelanguagetranslator_flags_order_cb() {
815
- $option_name = 'googlelanguagetranslator_flags_order';
816
- $new_value = '';
817
-
818
- if ( get_option ( $option_name ) === false ) {
819
-
820
- // The option does not exist, so we update it.
821
- update_option( $option_name, $new_value );
822
- }
823
-
824
- $options = get_option ( ''.$option_name.'' ); ?>
825
-
826
- <input type="hidden" id="order" name="googlelanguagetranslator_flags_order" value="<?php print_r(get_option('googlelanguagetranslator_flags_order')); ?>" />
827
- <?php
828
- }
829
-
830
- public function googlelanguagetranslator_css_cb() {
831
-
832
- $option_name = 'googlelanguagetranslator_css' ;
833
- $new_value = '';
834
-
835
- if ( get_option( $option_name ) === false ) {
836
-
837
- // The option does not exist, so we update it.
838
- update_option( $option_name, $new_value );
839
- }
840
-
841
- $options = get_option (''.$option_name.'');
842
-
843
- $html = '<textarea style="width:100%; height:200px" name="googlelanguagetranslator_css" id="googlelanguagetranslator_css">'.$options.'</textarea>';
844
- echo $html;
845
- }
846
-
847
- public function googlelanguagetranslator_manage_translations_cb() {
848
- $option_name = 'googlelanguagetranslator_manage_translations' ;
849
- $new_value = 0;
850
-
851
- if ( get_option( $option_name ) === false ) {
852
-
853
- // The option does not exist, so we update it.
854
- update_option( $option_name, $new_value );
855
- }
856
-
857
- $options = get_option (''.$option_name.'');
858
-
859
- $html = '<input type="checkbox" name="googlelanguagetranslator_manage_translations" id="googlelanguagetranslator_manage_translations" value="1" '.checked(1,$options,false).'/> &nbsp; Turn on translation management?';
860
- echo $html;
861
- }
862
-
863
- public function googlelanguagetranslator_multilanguage_cb() {
864
-
865
- $option_name = 'googlelanguagetranslator_multilanguage' ;
866
- $new_value = 0;
867
-
868
- if ( get_option( $option_name ) === false ) {
869
-
870
- // The option does not exist, so we update it.
871
- update_option( $option_name, $new_value );
872
- }
873
-
874
- $options = get_option (''.$option_name.'');
875
-
876
- $html = '<input type="checkbox" name="googlelanguagetranslator_multilanguage" id="googlelanguagetranslator_multilanguage" value="1" '.checked(1,$options,false).'/> &nbsp; Turn on multilanguage mode?';
877
- echo $html;
878
- }
879
-
880
- public function googlelanguagetranslator_exclude_translation_cb() {
881
-
882
- $option_name = 'googlelanguagetranslator_exclude_translation';
883
- $new_value = '';
884
-
885
- if (get_option($option_name) === false ) {
886
- // The option does not exist, so we update it.
887
- update_option( $option_name, $new_value );
888
- }
889
-
890
- $options = get_option (''.$option_name.'');
891
-
892
- $html = '<input type="text" name="'.$option_name.'" id="'.$option_name.'" value="'.$options.'" />';
893
-
894
- echo $html;
895
- }
896
-
897
- public function page_layout_cb() {
898
- include( plugin_dir_path( __FILE__ ) . '/css/style.php'); ?>
899
- <?php add_thickbox(); ?>
900
- <div class="wrap">
901
- <div id="icon-options-general" class="icon32"></div>
902
- <h2><span class="notranslate">Google Language Translator</span></h2>
903
- <form action="<?php echo admin_url( '/options.php'); ?>" method="post">
904
- <div class="metabox-holder has-right-sidebar" style="float:left; width:65%">
905
- <div class="postbox" style="width: 100%">
906
- <h3 class="notranslate">Settings</h3>
907
-
908
- <?php settings_fields('google_language_translator'); ?>
909
- <table style="border-collapse:separate" width="100%" border="0" cellspacing="8" cellpadding="0" class="form-table">
910
- <tr>
911
- <td style="width:60%" class="notranslate">Plugin Status:</td>
912
- <td class="notranslate"><?php $this->googlelanguagetranslator_active_cb(); ?></td>
913
- </tr>
914
-
915
- <tr class="notranslate">
916
- <td>Choose the original language of your website</td>
917
- <td><?php $this->googlelanguagetranslator_language_cb(); ?></td>
918
- </tr>
919
-
920
- <tr class="notranslate">
921
- <td>What translation languages will display in the language box?<br/>("All Languages" option <strong><u>must</u></strong> be chosen to show flags.)</td>
922
- <td><?php $this->googlelanguagetranslator_language_option_cb(); ?></td>
923
- </tr>
924
-
925
- <tr class="notranslate languages">
926
- <td colspan="2"><?php $this->language_display_settings_cb(); ?></td>
927
- </tr>
928
-
929
- <tr class="notranslate">
930
- <td class="choose_flags_intro">Show flag images?<br/>(Display up to 81 flags above the translator)</td>
931
- <td class="choose_flags_intro"><?php $this->googlelanguagetranslator_flags_cb(); ?></td>
932
- </tr>
933
-
934
- <tr class="notranslate choose_flags">
935
- <td class="choose_flags">Choose the flags you want to display:</td>
936
- <td></td>
937
- </tr>
938
-
939
- <tr class="notranslate">
940
- <td colspan="2" class="choose_flags"><?php $this->flag_display_settings_cb(); ?></td>
941
- </tr>
942
-
943
- <tr class="notranslate">
944
- <td>Show floating translation widget?<br/>
945
- <span>("All Languages" option <strong><u>must</u></strong> be chosen to show widget.)</span>
946
- </td>
947
- <td><?php $this->googlelanguagetranslator_floating_widget_cb(); ?></td>
948
- </tr>
949
-
950
- <tr class="notranslate">
951
- <td>Show translate box?</td>
952
- <td><?php $this->googlelanguagetranslator_translatebox_cb(); ?></td>
953
- </tr>
954
-
955
- <tr class="notranslate">
956
- <td>Layout option:</td>
957
- <td><?php $this->googlelanguagetranslator_display_cb(); ?></td>
958
- </tr>
959
-
960
- <tr class="notranslate">
961
- <td>Show Google Toolbar?</td>
962
- <td><?php $this->googlelanguagetranslator_toolbar_cb(); ?></td>
963
- </tr>
964
-
965
- <tr class="notranslate">
966
- <td>Show Google Branding? &nbsp;<a href="https://developers.google.com/translate/v2/attribution" target="_blank">Learn more</a></td>
967
- <td><?php $this->googlelanguagetranslator_showbranding_cb(); ?></td>
968
- </tr>
969
-
970
- <tr class="alignment notranslate">
971
- <td class="flagdisplay">Align the translator left or right?</td>
972
- <td class="flagdisplay"><?php $this->googlelanguagetranslator_flags_alignment_cb(); ?></td>
973
- </tr>
974
-
975
- <!--<tr class="manage_translations notranslate">
976
- <td>Turn on translation management? &nbsp;<a href="#TB_inline?width=200&height=300&inlineId=translation-management-description" title="What is Translation Management?" class="thickbox">Learn more</a><div id="translation-management-description" style="display:none"><p>Translation management is an interface that allows you to manage specific words and phrases on your website. The interface is linked directly to your Google Account, and no special subscriptions are necessary to setup this feature.</p><p>If translation management setting is checked, users who browse your website can hover their mouse over specific words and phrases, then send translation suggestions directly to your Google Translate account! You can then "approve" those suggestions, and Google will automatically display them when translations are requested by your users.</p><p>Translation management requires that you insert a custom meta tag into the <code>head</code> section of your website.</p><p><a href="http://translate.google.com/manager/website/settings" target="_blank">Click here to to get the required meta tag</a></p></div></td>
977
- <td><?php $this->googlelanguagetranslator_manage_translations_cb(); ?></td>
978
- </tr>-->
979
-
980
- <tr class="multilanguage notranslate">
981
- <td>Multilanguage Page option? &nbsp;<a href="#TB_inline?width=200&height=150&inlineId=multilanguage-page-description" title="What is the Multi-Language Page Option?" class="thickbox">Learn more</a><div id="multilanguage-page-description" style="display:none"><p>If checked, Google will automatically convert text written in multiple languages, into the single language requested by your user.</p><p>In most cases, this setting is not recommended, although for certain websites it might be necessary.</p></div></td>
982
- <td><?php $this->googlelanguagetranslator_multilanguage_cb(); ?></td>
983
- </tr>
984
-
985
- <tr class="notranslate">
986
- <td>Google Analytics:</td>
987
- <td><?php $this->googlelanguagetranslator_analytics_cb(); ?></td>
988
- </tr>
989
-
990
- <tr class="analytics notranslate">
991
- <td>Google Analytics ID (Ex. 'UA-11117410-2')</td>
992
- <td><?php $this->googlelanguagetranslator_analytics_id_cb(); ?></td>
993
- </tr>
994
-
995
- <tr class="notranslate">
996
- <td>Full widget usage in pages/posts/sidebar:</td>
997
- <td><code>[google-translator]</code></td>
998
- </tr>
999
- </table>
1000
-
1001
- <table style="border-collapse:separate" width="100%" border="0" cellspacing="8" cellpadding="0" class="form-table">
1002
- <tr class="notranslate">
1003
- <td style="width:40%">Full widget usage in header/footer or page template:</td>
1004
- <td style="width:60%"><code>&lt;?php echo do_shortcode('[google-translator]'); ?&gt;</code></td>
1005
- </tr>
1006
-
1007
- <tr class="notranslate">
1008
- <td>Single language usage in<br/>nav menu/pages/posts</td>
1009
- <td><code>[glt language="Spanish" label="Español"]</code></td>
1010
- </tr>
1011
-
1012
- <tr class="notranslate">
1013
- <td colspan="2">
1014
- <a href="#TB_inline?width=200&height=450&inlineId=single-language-shortcode-description" title="How to place a single language in your Wordpress menu" class="thickbox">How to place a single language in your Wordpress menu</a>
1015
- <div id="single-language-shortcode-description" style="display:none">
1016
- <p>For menu usage, you need to create a new menu, or use an existing menu, by navigating to "Appearance > Menus".</p>
1017
- <p>First you will need to enable "descriptions" for your menu items, which can be found in a tab labeled "Screen Options" in the upper-right area of the page.</p>
1018
- <p>Once descriptions are enabled, follow these steps:<br/>
1019
- <ol>
1020
- <li>Create a new menu item using "Link" as the menu item type.</li>
1021
- <li>Use <code style="border:none">#</code> for the URL</li>
1022
- <li>Enter a navigation label of your choice. This label does not appear on your website - it is meant only to help you identify the menu item.</li>
1023
- <li>Place the following shortcode into the "description" field, and modify it to display the language and navigation label of your choice:</li>
1024
- </ol>
1025
- <p><code>[glt language="Spanish" label="Español"]</code></p>
1026
- </div>
1027
- </td>
1028
- </tr>
1029
-
1030
- <tr class="notranslate">
1031
- <td>
1032
- <?php
1033
- if (isset($_POST['submit'])) {
1034
- if (empty($_POST['submit']) && !check_admin_referer( 'glt-save-settings', 'glt-save-settings-nonce' )) {
1035
- wp_die();
1036
- } else { echo 'hello'; }
1037
- }
1038
- wp_nonce_field('glt-save-settings, glt-save-settings-nonce', false);
1039
- submit_button();
1040
- ?>
1041
- </td>
1042
- <td></td>
1043
- </tr>
1044
- </table>
1045
- </div> <!-- .postbox -->
1046
- </div> <!-- .metbox-holder -->
1047
-
1048
- <div class="metabox-holder" style="float:right; clear:right; width:33%">
1049
- <div class="postbox">
1050
- <h3 class="notranslate">Preview</h3>
1051
- <table style="width:100%">
1052
- <tr>
1053
- <td style="box-sizing:border-box; -webkit-box-sizing:border-box; -moz-box-sizing:border-box; padding:15px 15px; margin:0px"><span class="notranslate"> Drag &amp; drop flags to change their position.<br/><br/>(Note: flag order resets when flags are added/removed)</span><br/><br/><?php echo do_shortcode('[google-translator]'); ?><p class="hello"><span class="notranslate">Translated text:</span> &nbsp; <span>Hello</span></p></td>
1054
- </tr>
1055
-
1056
- <tr>
1057
- <td><?php if (isset ($_POST['googlelanguagetranslator_flags_order']) ) { echo $_POST['googlelanguagetranslator_flags_order']; } ?></td>
1058
- </tr>
1059
-
1060
-
1061
- </table>
1062
- </div> <!-- .postbox -->
1063
- </div> <!-- .metabox-holder -->
1064
-
1065
- <div id="glt_advanced_settings" class="metabox-holder notranslate" style="float: right; width: 33%;">
1066
- <div class="postbox">
1067
- <h3>Advanced Settings</h3>
1068
- <div class="inside">
1069
- <table style="border-collapse:separate" width="100%" border="0" cellspacing="8" cellpadding="0" class="form-table">
1070
- <tr class="notranslate">
1071
- <td class="advanced">Select flag size:</td>
1072
- <td class="advanced"><?php $this->googlelanguagetranslator_flag_size_cb(); ?></td>
1073
- </tr>
1074
- </table>
1075
- </div>
1076
- </div>
1077
- </div>
1078
-
1079
-
1080
- <div class="metabox-holder notranslate" style="float: right; width: 33%;">
1081
- <div class="postbox">
1082
- <h3>Add CSS Styles</h3>
1083
- <div class="inside">
1084
- <p>You can apply any necessary CSS styles below:</p>
1085
- <?php $this->googlelanguagetranslator_css_cb(); ?>
1086
- </div>
1087
- </div>
1088
- </div>
1089
- <?php $this->googlelanguagetranslator_flags_order_cb(); ?>
1090
- </form>
1091
-
1092
- <div class="metabox-holder notranslate" style="float: right; width: 33%;">
1093
- <div class="postbox">
1094
- <h3>GLT Premium 4.0.9 is Here! $30</h3>
1095
- <div class="inside"><a href="http://www.wp-studio.net/" target="_blank"><img style="background:#444; border-radius:3px; -webkit-border-radius:3px; -moz-border-radius:3px" src="<?php echo plugins_url('google-language-translator/images/logo.png'); ?>"></a><br />
1096
- <ul id="features" style="margin-left:15px">
1097
- <li style="list-style:square outside"><span style="color:red; font-weight:bold">New!</span> Manual Translation Module (Experimental)!</li>
1098
- <li style="list-style:square outside"><span style="color:red; font-weight:bold">New!</span> Exclude any specific area of your website from translation, directly from your settings panel</li>
1099
- <li style="list-style:square outside">81 Languages</li>
1100
- <li style="list-style:square outside">jQuery-powered language switcher<br/>(No Adobe Flash required)</li>
1101
- <li style="list-style:square outside">Add single languages to your menus/pages/posts</li>
1102
- <li style="list-style:square outside">Show/hide images or text for each language</li>
1103
- <li style="list-style:square outside">Language switcher loads inline with page content</li>
1104
- <li style="list-style:square outside">Custom flag choices for English, Spanish and Portuguese</li>
1105
- <li style="list-style:square outside">User-friendly URLs, hide or show <code>lang</code> attribute</li>
1106
- <li style="list-style:square outside">Drag/drop flags to re-arrange their order</li>
1107
- <li style="list-style:square outside">Full access to our support forum</li>
1108
- <li style="list-style:square outside">FREE access to all future updates</li>
1109
- </ul>
1110
- </div>
1111
- </div>
1112
- </div>
1113
-
1114
- <div class="metabox-holder notranslate" style="float: right; width: 33%;">
1115
- <div class="postbox">
1116
- <h3>Please Consider A Donation</h3>
1117
- <div class="inside">If you like this plugin and find it useful, help keep this plugin actively developed by clicking the donate button <br /><br />
1118
- <form action="https://www.paypal.com/cgi-bin/webscr" method="post">
1119
- <input type="hidden" name="cmd" value="_donations">
1120
- <input type="hidden" name="business" value="robertmyrick@hotmail.com">
1121
- <input type="hidden" name="lc" value="US">
1122
- <input type="hidden" name="item_name" value="Support Studio 88 Design and help us bring you more Wordpress goodies! Any donation is kindly appreciated. Thank you!">
1123
- <input type="hidden" name="no_note" value="0">
1124
- <input type="hidden" name="currency_code" value="USD">
1125
- <input type="hidden" name="bn" value="PP-DonationsBF:btn_donateCC_LG.gif:NonHostedGuest">
1126
- <input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
1127
- <img alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1">
1128
- </form>
1129
- <br />
1130
- <br />
1131
- </div>
1132
- </div>
1133
- </div>
1134
- </div> <!-- .wrap -->
1135
- <?php
1136
- }
1137
- }
 
 
 
 
 
 
 
 
 
 
1138
  $google_language_translator = new google_language_translator();
1
+ <?php
2
+ /*
3
+ Plugin Name: Google Language Translator
4
+ Plugin URI: http://www.studio88design.com/plugins/google-language-translator
5
+ Version: 5.0.03
6
+ Description: The MOST SIMPLE Google Translator plugin. This plugin adds Google Translator to your website by using a single shortcode, [google-translator]. Settings include: layout style, hide/show specific languages, hide/show Google toolbar, and hide/show Google branding. Add the shortcode to pages, posts, and widgets.
7
+ Author: Rob Myrick
8
+ Author URI: http://www.wp-studio.net/
9
+ */
10
+
11
+ include( plugin_dir_path( __FILE__ ) . 'widget.php');
12
+
13
+ class google_language_translator {
14
+
15
+ public $languages_array = array (
16
+ 'af' => 'Afrikaans',
17
+ 'sq' => 'Albanian',
18
+ 'ar' => 'Arabic',
19
+ 'hy' => 'Armenian',
20
+ 'az' => 'Azerbaijani',
21
+ 'eu' => 'Basque',
22
+ 'be' => 'Belarusian',
23
+ 'bn' => 'Bengali',
24
+ 'bs' => 'Bosnian',
25
+ 'bg' => 'Bulgarian',
26
+ 'ca' => 'Catalan',
27
+ 'ceb' => 'Cebuano',
28
+ 'ny' => 'Chichewa',
29
+ 'zh-CN' => 'Chinese',
30
+ 'zh-TW' => 'Chinese(Traditional)',
31
+ 'hr' => 'Croatian',
32
+ 'cs' => 'Czech',
33
+ 'da' => 'Danish',
34
+ 'nl' => 'Dutch',
35
+ 'en' => 'English',
36
+ 'eo' => 'Esperanto',
37
+ 'et' => 'Estonian',
38
+ 'tl' => 'Filipino',
39
+ 'fi' => 'Finnish',
40
+ 'fr' => 'French',
41
+ 'gl' => 'Galician',
42
+ 'ka' => 'Georgian',
43
+ 'de' => 'German',
44
+ 'el' => 'Greek',
45
+ 'gu' => 'Gujarati',
46
+ 'ht' => 'Haitian',
47
+ 'ha' => 'Hausa',
48
+ 'iw' => 'Hebrew',
49
+ 'hi' => 'Hindi',
50
+ 'hmn' => 'Hmong',
51
+ 'hu' => 'Hungarian',
52
+ 'is' => 'Icelandic',
53
+ 'ig' => 'Igbo',
54
+ 'id' => 'Indonesian',
55
+ 'ga' => 'Irish',
56
+ 'it' => 'Italian',
57
+ 'ja' => 'Japanese',
58
+ 'jw' => 'Javanese',
59
+ 'kn' => 'Kannada',
60
+ 'kk' => 'Kazakh',
61
+ 'km' => 'Khmer',
62
+ 'ko' => 'Korean',
63
+ 'lo' => 'Lao',
64
+ 'la' => 'Latin',
65
+ 'lv' => 'Latvian',
66
+ 'lt' => 'Lithuanian',
67
+ 'mk' => 'Macedonian',
68
+ 'mg' => 'Malagasy',
69
+ 'ms' => 'Malay',
70
+ 'ml' => 'Malayalam',
71
+ 'mt' => 'Maltese',
72
+ 'mi' => 'Maori',
73
+ 'mr' => 'Marathi',
74
+ 'mn' => 'Mongolian',
75
+ 'my' => 'Myanmar(Burmese)',
76
+ 'ne' => 'Nepali',
77
+ 'no' => 'Norwegian',
78
+ 'fa' => 'Persian',
79
+ 'pl' => 'Polish',
80
+ 'pt' => 'Portuguese',
81
+ 'pa' => 'Punjabi',
82
+ 'ro' => 'Romanian',
83
+ 'ru' => 'Russian',
84
+ 'sr' => 'Serbian',
85
+ 'st' => 'Sesotho',
86
+ 'si' => 'Sinhala',
87
+ 'sk' => 'Slovak',
88
+ 'sl' => 'Slovenian',
89
+ 'so' => 'Somali',
90
+ 'es' => 'Spanish',
91
+ 'su' => 'Sundanese',
92
+ 'sw' => 'Swahili',
93
+ 'sv' => 'Swedish',
94
+ 'tg' => 'Tajik',
95
+ 'ta' => 'Tamil',
96
+ 'te' => 'Telugu',
97
+ 'th' => 'Thai',
98
+ 'tr' => 'Turkish',
99
+ 'uk' => 'Ukranian',
100
+ 'ur' => 'Urdu',
101
+ 'uz' => 'Uzbek',
102
+ 'vi' => 'Vietnamese',
103
+ 'cy' => 'Welsh',
104
+ 'yi' => 'Yiddish',
105
+ 'yo' => 'Yoruba',
106
+ 'zu' => 'Zulu'
107
+ );
108
+
109
+ public function __construct() {
110
+ register_activation_hook( __FILE__, array( &$this, 'glt_activate' ));
111
+ register_uninstall_hook( __FILE__, 'glt_deactivate' );
112
+ add_action( 'admin_menu', array( &$this, 'add_my_admin_menus'));
113
+ add_action('admin_init',array(&$this, 'initialize_settings'));
114
+ add_action('wp_head',array(&$this, 'load_css'));
115
+ add_action('wp_footer',array(&$this, 'footer_script'));
116
+ add_shortcode( 'google-translator',array(&$this, 'google_translator_shortcode'));
117
+ add_shortcode( 'glt', array(&$this, 'google_translator_menu_language'));
118
+ add_filter('widget_text','do_shortcode');
119
+ add_filter('walker_nav_menu_start_el', array(&$this,'menu_shortcodes') , 10 , 2);
120
+ add_filter( 'plugin_action_links_' . plugin_basename(__FILE__), array(&$this, 'glt_settings_link') );
121
+
122
+ if (!is_admin()) {
123
+ add_action('init',array(&$this, 'flags'));
124
+ }
125
+ }
126
+
127
+ public function glt_activate() {
128
+ add_option('googlelanguagetranslator_active', 1);
129
+ add_option('googlelanguagetranslator_language','en');
130
+ add_option('googlelanguagetranslator_language_option','all');
131
+ add_option('googlelanguagetranslator_flags','show_flags');
132
+ add_option('language_display_settings',array ('en' => 1));
133
+ add_option('flag_display_settings',array ('flag-en' => 1));
134
+ add_option('googlelanguagetranslator_translatebox','yes');
135
+ add_option('googlelanguagetranslator_display','Vertical');
136
+ add_option('googlelanguagetranslator_toolbar','Yes');
137
+ add_option('googlelanguagetranslator_showbranding','Yes');
138
+ add_option('googlelanguagetranslator_flags_alignment','flags_left');
139
+ add_option('googlelanguagetranslator_analytics', 0);
140
+ add_option('googlelanguagetranslator_analytics_id','');
141
+ add_option('googlelanguagetranslator_css','');
142
+ add_option('googlelanguagetranslator_manage_translations',0);
143
+ add_option('googlelanguagetranslator_multilanguage',0);
144
+ add_option('googlelanguagetranslator_floating_widget','yes');
145
+ add_option('googlelanguagetranslator_flag_size','18');
146
+ add_option('googlelanguagetranslator_flags_order','');
147
+ }
148
+
149
+ public function glt_deactivate() {
150
+ delete_option('googlelanguagetranslator_active', 1);
151
+ delete_option('googlelanguagetranslator_language','en');
152
+ delete_option('googlelanguagetranslator_language_option','all');
153
+ delete_option('googlelanguagetranslator_flags','show_flags');
154
+ delete_option('language_display_settings',array ('en' => 1));
155
+ delete_option('flag_display_settings',array ('flag-en' => 1));
156
+ delete_option('googlelanguagetranslator_translatebox','yes');
157
+ delete_option('googlelanguagetranslator_display','Vertical');
158
+ delete_option('googlelanguagetranslator_toolbar','Yes');
159
+ delete_option('googlelanguagetranslator_showbranding','Yes');
160
+ delete_option('googlelanguagetranslator_flags_alignment','flags_left');
161
+ delete_option('googlelanguagetranslator_analytics',1);
162
+ delete_option('googlelanguagetranslator_analytics_id','');
163
+ delete_option('googlelanguagetranslator_css','');
164
+ delete_option('googlelanguagetranslator_manage_translations',0);
165
+ delete_option('googlelanguagetranslator_multilanguage',0);
166
+ delete_option('googlelanguagetranslator_floating_widget','yes');
167
+ delete_option('googlelanguagetranslator_flag_size','18');
168
+ delete_option('googlelanguagetranslator_flags_order','');
169
+ }
170
+
171
+ public function glt_settings_link ( $links ) {
172
+ $settings_link = array(
173
+ '<a href="' . admin_url( 'options-general.php?page=google_language_translator' ) . '">Settings</a>',
174
+ );
175
+ return array_merge( $links, $settings_link );
176
+ }
177
+
178
+ public function add_my_admin_menus(){
179
+ $p = add_options_page('Google Language Translator', 'Google Language Translator', 'manage_options', 'google_language_translator', array(&$this, 'page_layout_cb'));
180
+
181
+ add_action( 'load-' . $p, array(&$this, 'load_admin_js' ));
182
+ }
183
+
184
+ public function load_admin_js(){
185
+ add_action( 'admin_enqueue_scripts', array(&$this, 'enqueue_admin_js' ));
186
+ add_action('admin_footer',array(&$this, 'footer_script'));
187
+ }
188
+
189
+ public function enqueue_admin_js(){
190
+ wp_enqueue_script( 'my-admin-script', plugins_url('js/admin.js',__FILE__), array('jquery'));
191
+ wp_enqueue_script( 'my-flag-script', plugins_url('js/flags.js',__FILE__), array('jquery'));
192
+
193
+ if (get_option ('googlelanguagetranslator_floating_widget') == 'yes') {
194
+ wp_enqueue_script( 'my-toolbar-script', plugins_url('js/toolbar.js',__FILE__), array('jquery'));
195
+ wp_enqueue_script( 'my-load-toolbar-script', plugins_url('js/load-toolbar.js',__FILE__), array('jquery'));
196
+ wp_register_style( 'toolbar.css', plugins_url('css/toolbar.css', __FILE__) );
197
+ wp_enqueue_style( 'toolbar.css' );
198
+ }
199
+
200
+ wp_enqueue_script( 'jquery-ui-core');
201
+ wp_enqueue_script( 'jquery-ui-sortable');
202
+ wp_enqueue_script( 'load_sortable_flags', plugins_url('js/load-sortable-flags.js',__FILE__), array('jquery'));
203
+ wp_register_style( 'jquery-ui.css', plugins_url('css/jquery-ui.css',__FILE__) );
204
+ wp_register_style( 'style.css', plugins_url('css/style.css', __FILE__) );
205
+ wp_enqueue_style( 'style.css' );
206
+ //wp_enqueue_style( 'jquery-ui.css' );
207
+ }
208
+
209
+ public function flags() {
210
+ wp_enqueue_script( 'flags', plugins_url('js/flags.js',__FILE__), array('jquery'));
211
+
212
+ if (get_option ('googlelanguagetranslator_floating_widget') == 'yes') {
213
+ wp_enqueue_script( 'my-toolbar-script', plugins_url('js/toolbar.js',__FILE__), array('jquery'));
214
+ wp_enqueue_script( 'my-load-toolbar-script', plugins_url('js/load-toolbar.js',__FILE__), array('jquery'));
215
+ wp_register_style( 'toolbar.css', plugins_url('css/toolbar.css', __FILE__) );
216
+ wp_enqueue_style( 'toolbar.css' );
217
+ }
218
+
219
+ wp_register_style( 'style.css', plugins_url('css/style.css', __FILE__) );
220
+ wp_enqueue_style( 'style.css' );
221
+ }
222
+
223
+ public function load_css() {
224
+ include( plugin_dir_path( __FILE__ ) . '/css/style.php');
225
+ }
226
+
227
+ public function google_translator_shortcode() {
228
+
229
+ if (get_option('googlelanguagetranslator_display')=='Vertical'){
230
+ return $this->googlelanguagetranslator_vertical();
231
+ }
232
+ elseif(get_option('googlelanguagetranslator_display')=='Horizontal'){
233
+ return $this->googlelanguagetranslator_horizontal();
234
+ }
235
+ }
236
+
237
+ public function googlelanguagetranslator_included_languages() {
238
+ if ( get_option('googlelanguagetranslator_language_option')=='specific') {
239
+ $get_language_choices = get_option ('language_display_settings');
240
+
241
+ foreach ($get_language_choices as $key=>$value) {
242
+ if($value == 1) {
243
+ $items[] = $key;
244
+ }
245
+ }
246
+
247
+ $comma_separated = implode(",",array_values($items));
248
+
249
+ if ( get_option('googlelanguagetranslator_display') == 'Vertical') {
250
+ $lang = ", includedLanguages:'".$comma_separated."'";
251
+ return $lang;
252
+ } elseif ( get_option('googlelanguagetranslator_display') == 'Horizontal') {
253
+ $lang = ", includedLanguages:'".$comma_separated."'";
254
+ return $lang;
255
+ }
256
+ }
257
+ }
258
+
259
+ public function analytics() {
260
+ if ( get_option('googlelanguagetranslator_analytics') == 1 ) {
261
+ $analytics_id = get_option('googlelanguagetranslator_analytics_id');
262
+ $analytics = "gaTrack: true, gaId: '".$analytics_id."'";
263
+
264
+ if (!empty ($analytics_id) ):
265
+ return ', '.$analytics;
266
+ endif;
267
+ }
268
+ }
269
+
270
+ public function menu_shortcodes( $item_output,$item ) {
271
+ if ( !empty($item->description)) {
272
+ $output = do_shortcode($item->description);
273
+
274
+ if ( $output != $item->description )
275
+ $item_output = $output;
276
+ }
277
+ return $item_output;
278
+ }
279
+
280
+ public function google_translator_menu_language($atts, $content = '') {
281
+ extract(shortcode_atts(array(
282
+ "language" => 'Spanish',
283
+ "label" => 'Spanish'
284
+ ), $atts));
285
+
286
+ $default_language = get_option('googlelanguagetranslator_language');
287
+ $language_code = array_search($language,$this->languages_array);
288
+
289
+ return "<a class='nturl notranslate ".$language_code." single-language flag' title='".$language."'>".$label."</a>";
290
+ }
291
+
292
+ public function footer_script() {
293
+ global $shortcode_started;
294
+ $default_language = get_option('googlelanguagetranslator_language');
295
+ $language_choices = $this->googlelanguagetranslator_included_languages();
296
+ $get_language_option = get_option('googlelanguagetranslator_language_option');
297
+ $get_flag_choices = get_option ('flag_display_settings');
298
+ $floating_widget = get_option ('googlelanguagetranslator_floating_widget');
299
+ $is_active = get_option ( 'googlelanguagetranslator_active' );
300
+ $is_multilanguage = get_option('googlelanguagetranslator_multilanguage');
301
+ $auto_display = ', autoDisplay: false';
302
+ $str = ''; ?>
303
+ <script>jQuery(document).ready(function(a){a("a.nturl").on("click",function(){function l(){doGoogleLanguageTranslator(default_lang+"|"+default_lang)}function n(){doGoogleLanguageTranslator(default_lang+"|"+lang_prefix)}default_lang="<?php echo get_option('googlelanguagetranslator_language'); ?>",lang_prefix=a(this).attr("class").split(" ")[2],lang_prefix==default_lang?l():n()}),a("a.flag").on("click",function(){function l(){doGoogleLanguageTranslator(default_lang+"|"+default_lang)}function n(){doGoogleLanguageTranslator(default_lang+"|"+lang_prefix)}default_lang="<?php echo get_option('googlelanguagetranslator_language'); ?>",lang_prefix=a(this).attr("class").split(" ")[2],a(".tool-container").hide(),lang_prefix==default_lang?l():n()}),0==a("body > #google_language_translator").length&&a("#glt-footer").html("<div id='google_language_translator'></div>")});</script>
304
+
305
+ <?php
306
+
307
+ if( $is_active == 1) {
308
+
309
+ foreach ($get_flag_choices as $flag_choice_key) {}
310
+
311
+ if ($floating_widget=='yes' && $get_language_option != 'specific') {
312
+ $str.='<div id="glt-translate-trigger"><span class="notranslate">Translate &raquo;</span></div>';
313
+ $str.='<div id="glt-toolbar"></div>';
314
+ } //endif $floating_widget
315
+
316
+ if ($shortcode_started != 'true') {
317
+ $str.='<div id="flags" style="display:none">';
318
+ $str.='<ul id="sortable" class="ui-sortable">';
319
+
320
+ if ((empty($new_languages_array_string)) || ($new_languages_array_count != $get_flag_choices_count)) {
321
+ foreach ($this->languages_array as $key=>$value) {
322
+ $language_code = $key;
323
+ $language_name = $value;
324
+ $language_name_flag = $language_name;
325
+ if ($flag_choice_key == '1') {
326
+ if ( isset ( $get_flag_choices['flag-'.$language_code.''] ) ) {
327
+ $str.="<li id='".$language_name."'><a title='".$language_name."' class='notranslate flag ".$language_code."'></a></li>";
328
+ }
329
+ } //$key
330
+ }//foreach
331
+ } else {
332
+ foreach ($new_languages_array_codes as $value) {
333
+ $language_name = $value;
334
+ $language_code = array_search ($language_name,$this->languages_array);
335
+ $language_name_flag = $language_name;
336
+ if ($flag_choice_key == '1') {
337
+ if (in_array($language_name,$this->languages_array)) {
338
+ if ( isset ( $get_flag_choices['flag-'.$language_code.''] ) ) {
339
+ $str.="<li id='".$language_name."'><a title='".$language_name."' class='notranslate flag ".$language_code."'></a></li>";
340
+ } //isset
341
+ } //in_array
342
+ }//flag_choice_key
343
+ }//foreach
344
+ }//endif
345
+ $str.='</ul>';
346
+ $str.='</div>';
347
+ }
348
+ }
349
+
350
+ $language_choices = $this->googlelanguagetranslator_included_languages();
351
+ $layout = get_option('googlelanguagetranslator_display');
352
+ $is_multilanguage = get_option('googlelanguagetranslator_multilanguage');
353
+ $horizontal_layout = ', layout: google.translate.TranslateElement.InlineLayout.HORIZONTAL';
354
+ $auto_display = ', autoDisplay: false';
355
+ $default_language = get_option('googlelanguagetranslator_language');
356
+
357
+ if ($is_multilanguage == 1) {
358
+ $multilanguagePage = ', multilanguagePage:true';
359
+ $str.="<div id='glt-footer'></div><script type='text/javascript'>function GoogleLanguageTranslatorInit() { new google.translate.TranslateElement({pageLanguage: '".$default_language."'".$language_choices . ($layout=='Horizontal' ? $horizontal_layout : '') . $auto_display . $multilanguagePage . $this->analytics()."}, 'google_language_translator');}</script>";
360
+ $str.="<script type='text/javascript' src='//translate.google.com/translate_a/element.js?cb=GoogleLanguageTranslatorInit'></script>";
361
+ echo $str;
362
+
363
+ } elseif ($is_multilanguage == 0) {
364
+ $str.="<div id='glt-footer'></div><script type='text/javascript'>function GoogleLanguageTranslatorInit() { new google.translate.TranslateElement({pageLanguage: '".$default_language."'".$language_choices . ($layout=='Horizontal' ? $horizontal_layout : '') . $auto_display . $this->analytics()."}, 'google_language_translator');}</script>";
365
+ $str.="<script type='text/javascript' src='//translate.google.com/translate_a/element.js?cb=GoogleLanguageTranslatorInit'></script>";
366
+ echo $str;
367
+ }
368
+ }
369
+
370
+ public function googlelanguagetranslator_vertical() {
371
+
372
+ global $shortcode_started;
373
+
374
+ $shortcode_started = 'true';
375
+ $get_flag_choices = get_option ('flag_display_settings');
376
+ $new_languages_array_string = get_option('googlelanguagetranslator_flags_order');
377
+ $new_languages_array = explode(",",$new_languages_array_string);
378
+ $new_languages_array_codes = array_values($new_languages_array);
379
+ $new_languages_array_count = count($new_languages_array);
380
+ $get_flag_choices_count = count($get_flag_choices);
381
+ $get_language_choices = get_option ('language_display_settings');
382
+ $flag_width = get_option('googlelanguagetranslator_flag_size');
383
+ $default_language_code = get_option('googlelanguagetranslator_language');
384
+ $is_active = get_option ( 'googlelanguagetranslator_active' );
385
+ $get_language_option = get_option('googlelanguagetranslator_language_option');
386
+ $language_choices = $this->googlelanguagetranslator_included_languages();
387
+ $floating_widget = get_option ('googlelanguagetranslator_floating_widget');
388
+ $str = '';
389
+
390
+ if( $is_active == 1){
391
+
392
+ foreach ($get_flag_choices as $flag_choice_key) {}
393
+
394
+ $str.='<div id="flags" class="size'.$flag_width.'">';
395
+ $str.='<ul id="sortable" class="ui-sortable" style="float:left">';
396
+
397
+ if ((empty($new_languages_array_string)) || ($new_languages_array_count != $get_flag_choices_count)) {
398
+ foreach ($this->languages_array as $key=>$value) {
399
+ $language_code = $key;
400
+ $language_name = $value;
401
+ $language_name_flag = $language_name;
402
+ if ($flag_choice_key == '1') {
403
+ if ( isset ( $get_flag_choices['flag-'.$language_code.''] ) ) {
404
+ $str.="<li id='".$language_name."'><a title='".$language_name."' class='notranslate flag ".$language_code."'></a></li>";
405
+ }
406
+ } //$key
407
+ }//foreach
408
+ } else {
409
+ foreach ($new_languages_array_codes as $value) {
410
+ $language_name = $value;
411
+ $language_code = array_search ($language_name,$this->languages_array);
412
+ $language_name_flag = $language_name;
413
+ if ($flag_choice_key == '1') {
414
+ if (in_array($language_name,$this->languages_array)) {
415
+ if ( isset ( $get_flag_choices['flag-'.$language_code.''] ) ) {
416
+ $str.="<li id='".$language_name."'><a title='".$language_name."' class='notranslate flag ".$language_code."'></a></li>";
417
+ } //isset
418
+ } //in_array
419
+ }//flag_choice_key
420
+ }//foreach
421
+ }//endif
422
+ $str.='</ul>';
423
+ $str.='</div>';
424
+ $str.='<div id="google_language_translator"></div>';
425
+ return $str;
426
+ } //End is_active
427
+ } // End glt_vertical
428
+
429
+ public function googlelanguagetranslator_horizontal(){
430
+ $shortcode_started = true;
431
+ $get_flag_choices = get_option ('flag_display_settings');
432
+ $new_languages_array_string = get_option('googlelanguagetranslator_flags_order');
433
+ $new_languages_array = explode(",",$new_languages_array_string);
434
+ $new_languages_array_codes = array_values($new_languages_array);
435
+ $new_languages_array_count = count($new_languages_array);
436
+ $get_flag_choices_count = count($get_flag_choices);
437
+ $get_language_choices = get_option ('language_display_settings');
438
+ $flag_width = get_option('googlelanguagetranslator_flag_size');
439
+ $default_language_code = get_option('googlelanguagetranslator_language');
440
+ $is_active = get_option ( 'googlelanguagetranslator_active' );
441
+ $get_language_option = get_option('googlelanguagetranslator_language_option');
442
+ $language_choices = $this->googlelanguagetranslator_included_languages();
443
+ $floating_widget = get_option ('googlelanguagetranslator_floating_widget');
444
+ $str = '';
445
+
446
+ if( $is_active == 1) {
447
+ foreach ($get_flag_choices as $flag_choice_key) {}
448
+
449
+ $str.='<div id="flags" class="size'.$flag_width.'">';
450
+ $str.='<ul id="sortable" class="ui-sortable" style="float:left">';
451
+
452
+ if ((empty($new_languages_array_string)) || ($new_languages_array_count != $get_flag_choices_count)) {
453
+ foreach ($this->languages_array as $key=>$value) {
454
+ $language_code = $key;
455
+ $language_name = $value;
456
+ $language_name_flag = $language_name;
457
+
458
+ if ($flag_choice_key == '1') {
459
+ if ( isset ( $get_flag_choices['flag-'.$language_code.''] ) ) {
460
+ $str.="<li id='".$language_name."'><a title='".$language_name."' class='notranslate flag ".$language_code."'></a></li>";
461
+ }
462
+ } //$key
463
+ }//foreach
464
+
465
+ } else {
466
+
467
+ foreach ($new_languages_array_codes as $value) {
468
+ $language_name = $value;
469
+ $language_code = array_search ($language_name,$this->languages_array);
470
+ $language_name_flag = $language_name;
471
+ if ($flag_choice_key == '1') {
472
+ if (in_array($language_name,$this->languages_array)) {
473
+ if ( isset ( $get_flag_choices['flag-'.$language_code.''] ) ) {
474
+ $str.="<li id='".$language_name."'><a title='".$language_name."' class='notranslate flag ".$language_code."'></a></li>";
475
+ } //isset
476
+ } //in_array
477
+ }//flag_choice_key
478
+ }//foreach
479
+ }//endif
480
+ $str.='</ul>';
481
+ $str.='</div>';
482
+ $str.='<div id="google_language_translator"></div>';
483
+ return $str;
484
+ }
485
+ } // End glt_horizontal
486
+
487
+ public function initialize_settings() {
488
+ add_settings_section('glt_settings','Settings','','google_language_translator');
489
+
490
+ $settings_name_array = array (
491
+ 'googlelanguagetranslator_active','googlelanguagetranslator_language','googlelanguagetranslator_language_option','language_display_settings','googlelanguagetranslator_flags','flag_display_settings','googlelanguagetranslator_translatebox','googlelanguagetranslator_display','googlelanguagetranslator_toolbar','googlelanguagetranslator_showbranding','googlelanguagetranslator_flags_alignment','googlelanguagetranslator_analytics','googlelanguagetranslator_analytics_id','googlelanguagetranslator_css','googlelanguagetranslator_manage_translations','googlelanguagetranslator_multilanguage','googlelanguagetranslator_floating_widget','googlelanguagetranslator_flag_size','googlelanguagetranslator_flags_order','googlelanguagetranslator_exclude_translation'
492
+ );
493
+
494
+ $settings_callback_array = array ( 'googlelanguagetranslator_active_cb','googlelanguagetranslator_language_cb','googlelanguagetranslator_language_option_cb','language_display_settings_cb','googlelanguagetranslator_flags_cb','flag_display_settings_cb','googlelanguagetranslator_translatebox_cb','googlelanguagetranslator_display_cb','googlelanguagetranslator_toolbar_cb','googlelanguagetranslator_showbranding_cb','googlelanguagetranslator_flags_alignment_cb','googlelanguagetranslator_analytics_cb','googlelanguagetranslator_analytics_id_cb','googlelanguagetranslator_css_cb','googlelanguagetranslator_manage_translations_cb','googlelanguagetranslator_multilanguage_cb','googlelanguagetranslator_floating_widget_cb','googlelanguagetranslator_flag_size_cb','googlelanguagetranslator_flags_order_cb','googlelanguagetranslator_exclude_translation_cb'
495
+ );
496
+
497
+ foreach ($settings_name_array as $setting) {
498
+ add_settings_field( $setting,'',$setting.'_cb','google_language_translator','glt_settings');
499
+ register_setting( 'google_language_translator',$setting);
500
+ }
501
+ }
502
+
503
+ public function googlelanguagetranslator_active_cb() {
504
+ $option_name = 'googlelanguagetranslator_active' ;
505
+ $new_value = 1;
506
+ if ( get_option( $option_name ) === false ) {
507
+
508
+ // The option does not exist, so we update it.
509
+ update_option( $option_name, $new_value );
510
+ }
511
+
512
+ $options = get_option (''.$option_name.'');
513
+
514
+ $html = '<input type="checkbox" name="googlelanguagetranslator_active" id="googlelanguagetranslator_active" value="1" '.checked(1,$options,false).'/> &nbsp; Check this box to activate';
515
+ echo $html;
516
+ }
517
+
518
+ public function googlelanguagetranslator_language_cb() {
519
+
520
+ $option_name = 'googlelanguagetranslator_language';
521
+ $new_value = 'en';
522
+
523
+ if ( get_option( $option_name ) === false ) {
524
+
525
+ // The option does not exist, so we update it.
526
+ update_option( $option_name, $new_value );
527
+ }
528
+
529
+ $options = get_option (''.$option_name.''); ?>
530
+
531
+ <select name="googlelanguagetranslator_language" id="googlelanguagetranslator_language">
532
+
533
+ <?php
534
+
535
+ foreach ($this->languages_array as $key => $value) {
536
+ $language_code = $key;
537
+ $language_name = $value; ?>
538
+ <option value="<?php echo $language_code; ?>" <?php if($options==''.$language_code.''){echo "selected";}?>><?php echo $language_name; ?></option>
539
+ <?php } ?>
540
+ </select>
541
+ <?php
542
+ }
543
+
544
+ public function googlelanguagetranslator_language_option_cb() {
545
+
546
+ $option_name = 'googlelanguagetranslator_language_option' ;
547
+ $new_value = 'all';
548
+
549
+ if ( get_option( $option_name ) === false ) {
550
+
551
+ // The option does not exist, so we update it.
552
+ update_option( $option_name, $new_value );
553
+ }
554
+
555
+ $options = get_option (''.$option_name.''); ?>
556
+
557
+ <input type="radio" name="googlelanguagetranslator_language_option" id="googlelanguagetranslator_language_option" value="all" <?php if($options=='all'){echo "checked";}?>/> All Languages<br/>
558
+ <input type="radio" name="googlelanguagetranslator_language_option" id="googlelanguagetranslator_language_option" value="specific" <?php if($options=='specific'){echo "checked";}?>/> Specific Languages
559
+ <?php
560
+ }
561
+
562
+ public function language_display_settings_cb() {
563
+ $default_language_code = get_option('googlelanguagetranslator_language');
564
+ $option_name = 'language_display_settings';
565
+ $new_value = array(''.$default_language_code.'' => 1);
566
+
567
+ if ( get_option( $option_name ) == false ) {
568
+ // The option does not exist, so we update it.
569
+ update_option( $option_name, $new_value );
570
+ }
571
+
572
+ $get_language_choices = get_option (''.$option_name.'');
573
+
574
+ foreach ($this->languages_array as $key => $value) {
575
+ $language_code = $key;
576
+ $language_name = $value;
577
+ $language_code_array[] = $key;
578
+
579
+ if (!isset($get_language_choices[''.$language_code.''])) {
580
+ $get_language_choices[''.$language_code.''] = 0;
581
+ }
582
+
583
+ $items[] = $get_language_choices[''.$language_code.''];
584
+ $language_codes = $language_code_array;
585
+ $item_count = count($items);
586
+
587
+ if ($item_count == 1 || $item_count == 24 || $item_count == 47 || $item_count == 70) { ?>
588
+ <div class="languages" style="width:25%; float:left">
589
+ <?php } ?>
590
+ <div><input type="checkbox" name="language_display_settings[<?php echo $language_code; ?>]" value="1"<?php checked( 1,$get_language_choices[''.$language_code.'']); ?>/><?php echo $language_name; ?></div>
591
+ <?php
592
+ if ($item_count == 23 || $item_count == 46 || $item_count == 69 || $item_count == 91) { ?>
593
+ </div>
594
+ <?php }
595
+ } ?>
596
+ <div class="clear"></div>
597
+ <?php
598
+ }
599
+
600
+ public function googlelanguagetranslator_flags_cb() {
601
+
602
+ $option_name = 'googlelanguagetranslator_flags' ;
603
+ $new_value = 'show_flags';
604
+
605
+ if ( get_option( $option_name ) === false ) {
606
+
607
+ // The option does not exist, so we update it.
608
+ update_option( $option_name, $new_value );
609
+ }
610
+
611
+ $options = get_option (''.$option_name.''); ?>
612
+
613
+ <input type="radio" name="googlelanguagetranslator_flags" id="googlelanguagetranslator_flags" value="show_flags" <?php if($options=='show_flags'){echo "checked";}?>/> Yes, show flag images<br/>
614
+ <input type="radio" name="googlelanguagetranslator_flags" id="googlelanguagetranslator_flags" value="hide_flags" <?php if($options=='hide_flags'){echo "checked";}?>/> No, hide flag images
615
+ <?php
616
+ }
617
+
618
+ public function flag_display_settings_cb() {
619
+ $default_language_code = get_option('googlelanguagetranslator_language');
620
+ $option_name = 'flag_display_settings';
621
+ $new_value = array('flag-'.$default_language_code.'' => 1);
622
+
623
+ if ( get_option( $option_name ) == false ) {
624
+ // The option does not exist, so we update it.
625
+ update_option( $option_name, $new_value );
626
+ }
627
+
628
+ $get_flag_choices = get_option (''.$option_name.'');
629
+
630
+ foreach ($this->languages_array as $key => $value) {
631
+ $language_code = $key;
632
+ $language_name = $value;
633
+ $language_code_array[] = $key;
634
+
635
+ if (!isset($get_flag_choices['flag-'.$language_code.''])) {
636
+ $get_flag_choices['flag-'.$language_code.''] = 0;
637
+ }
638
+
639
+ $items[] = $get_flag_choices['flag-'.$language_code.''];
640
+ $language_codes = $language_code_array;
641
+ $item_count = count($items);
642
+
643
+ if ($item_count == 1 || $item_count == 24 || $item_count == 47 || $item_count == 70) { ?>
644
+ <div class="flagdisplay" style="width:25%; float:left">
645
+ <?php } ?>
646
+ <div><input type="checkbox" name="flag_display_settings[flag-<?php echo $language_code; ?>]" value="1"<?php checked( 1,$get_flag_choices['flag-'.$language_code.'']); ?>/><?php echo $language_name; ?></div>
647
+ <?php
648
+ if ($item_count == 23 || $item_count == 46 || $item_count == 69 || $item_count == 91) { ?>
649
+ </div>
650
+ <?php }
651
+ } ?>
652
+ <div class="clear"></div>
653
+ <?php
654
+ }
655
+
656
+ public function googlelanguagetranslator_floating_widget_cb() {
657
+
658
+ $option_name = 'googlelanguagetranslator_floating_widget' ;
659
+ $new_value = 'yes';
660
+
661
+ if ( get_option( $option_name ) === false ) {
662
+
663
+ // The option does not exist, so we update it.
664
+ update_option( $option_name, $new_value );
665
+ }
666
+
667
+ $options = get_option (''.$option_name.''); ?>
668
+
669
+ <select name="googlelanguagetranslator_floating_widget" id="googlelanguagetranslator_floating_widget" style="width:170px">
670
+ <option value="yes" <?php if($options=='yes'){echo "selected";}?>>Yes, show widget</option>
671
+ <option value="no" <?php if($options=='no'){echo "selected";}?>>No, hide widget</option>
672
+ </select>
673
+ <?php }
674
+
675
+ public function googlelanguagetranslator_translatebox_cb() {
676
+
677
+ $option_name = 'googlelanguagetranslator_translatebox' ;
678
+ $new_value = 'yes';
679
+
680
+ if ( get_option( $option_name ) === false ) {
681
+
682
+ // The option does not exist, so we update it.
683
+ update_option( $option_name, $new_value );
684
+ }
685
+
686
+ $options = get_option (''.$option_name.''); ?>
687
+
688
+ <select name="googlelanguagetranslator_translatebox" id="googlelanguagetranslator_translatebox" style="width:190px">
689
+ <option value="yes" <?php if($options=='yes'){echo "selected";}?>>Yes, show language box</option>
690
+ <option value="no" <?php if($options=='no'){echo "selected";}?>>No, hide language box</option>
691
+ </select>
692
+ <?php }
693
+
694
+ public function googlelanguagetranslator_display_cb() {
695
+
696
+ $option_name = 'googlelanguagetranslator_display' ;
697
+ $new_value = 'Vertical';
698
+
699
+ if ( get_option( $option_name ) === false ) {
700
+
701
+ // The option does not exist, so we update it.
702
+ update_option( $option_name, $new_value );
703
+ }
704
+
705
+ $options = get_option (''.$option_name.''); ?>
706
+
707
+ <select name="googlelanguagetranslator_display" id="googlelanguagetranslator_display" style="width:170px;">
708
+ <option value="Vertical" <?php if(get_option('googlelanguagetranslator_display')=='Vertical'){echo "selected";}?>>Vertical</option>
709
+ <option value="Horizontal" <?php if(get_option('googlelanguagetranslator_display')=='Horizontal'){echo "selected";}?>>Horizontal</option>
710
+ </select>
711
+ <?php }
712
+
713
+ public function googlelanguagetranslator_toolbar_cb() {
714
+
715
+ $option_name = 'googlelanguagetranslator_toolbar' ;
716
+ $new_value = 'Yes';
717
+
718
+ if ( get_option( $option_name ) === false ) {
719
+
720
+ // The option does not exist, so we update it.
721
+ update_option( $option_name, $new_value );
722
+ }
723
+
724
+ $options = get_option (''.$option_name.''); ?>
725
+
726
+ <select name="googlelanguagetranslator_toolbar" id="googlelanguagetranslator_toolbar" style="width:170px;">
727
+ <option value="Yes" <?php if(get_option('googlelanguagetranslator_toolbar')=='Yes'){echo "selected";}?>>Yes</option>
728
+ <option value="No" <?php if(get_option('googlelanguagetranslator_toolbar')=='No'){echo "selected";}?>>No</option>
729
+ </select>
730
+ <?php }
731
+
732
+ public function googlelanguagetranslator_showbranding_cb() {
733
+
734
+ $option_name = 'googlelanguagetranslator_showbranding' ;
735
+ $new_value = 'Yes';
736
+
737
+ if ( get_option( $option_name ) === false ) {
738
+
739
+ // The option does not exist, so we update it.
740
+ update_option( $option_name, $new_value );
741
+ }
742
+
743
+ $options = get_option (''.$option_name.''); ?>
744
+
745
+ <select name="googlelanguagetranslator_showbranding" id="googlelanguagetranslator_showbranding" style="width:170px;">
746
+ <option value="Yes" <?php if(get_option('googlelanguagetranslator_showbranding')=='Yes'){echo "selected";}?>>Yes</option>
747
+ <option value="No" <?php if(get_option('googlelanguagetranslator_showbranding')=='No'){echo "selected";}?>>No</option>
748
+ </select>
749
+ <?php }
750
+
751
+ public function googlelanguagetranslator_flags_alignment_cb() {
752
+
753
+ $option_name = 'googlelanguagetranslator_flags_alignment' ;
754
+ $new_value = 'flags_left';
755
+
756
+ if ( get_option( $option_name ) === false ) {
757
+
758
+ // The option does not exist, so we update it.
759
+ update_option( $option_name, 'flags_left' );
760
+ }
761
+
762
+ $options = get_option (''.$option_name.''); ?>
763
+
764
+ <input type="radio" name="googlelanguagetranslator_flags_alignment" id="flags_left" value="flags_left" <?php if($options=='flags_left'){echo "checked";}?>/> Align Left<br/>
765
+ <input type="radio" name="googlelanguagetranslator_flags_alignment" id="flags_right" value="flags_right" <?php if($options=='flags_right'){echo "checked";}?>/> Align Right
766
+ <?php }
767
+
768
+ public function googlelanguagetranslator_analytics_cb() {
769
+
770
+ $option_name = 'googlelanguagetranslator_analytics' ;
771
+ $new_value = 0;
772
+
773
+ if ( get_option( $option_name ) === false ) {
774
+
775
+ // The option does not exist, so we update it.
776
+ update_option( $option_name, $new_value );
777
+ }
778
+
779
+ $options = get_option (''.$option_name.'');
780
+
781
+ $html = '<input type="checkbox" name="googlelanguagetranslator_analytics" id="googlelanguagetranslator_analytics" value="1" '.checked(1,$options,false).'/> &nbsp; Activate Google Analytics tracking?';
782
+ echo $html;
783
+ }
784
+
785
+ public function googlelanguagetranslator_analytics_id_cb() {
786
+
787
+ $option_name = 'googlelanguagetranslator_analytics_id' ;
788
+ $new_value = '';
789
+
790
+ if ( get_option( $option_name ) === false ) {
791
+
792
+ // The option does not exist, so we update it.
793
+ update_option( $option_name, $new_value );
794
+ }
795
+
796
+ $options = get_option (''.$option_name.'');
797
+
798
+ $html = '<input type="text" name="googlelanguagetranslator_analytics_id" id="googlelanguagetranslator_analytics_id" value="'.$options.'" />';
799
+ echo $html;
800
+ }
801
+
802
+ public function googlelanguagetranslator_flag_size_cb() {
803
+
804
+ $option_name = 'googlelanguagetranslator_flag_size' ;
805
+ $new_value = '18';
806
+
807
+ if ( get_option( $option_name ) === false ) {
808
+
809
+ // The option does not exist, so we update it.
810
+ update_option( $option_name, $new_value );
811
+ }
812
+
813
+ $options = get_option (''.$option_name.''); ?>
814
+
815
+ <select name="googlelanguagetranslator_flag_size" id="googlelanguagetranslator_flag_size" style="width:110px;">
816
+ <option value="16" <?php if($options=='16'){echo "selected";}?>>16px</option>
817
+ <option value="18" <?php if($options=='18'){echo "selected";}?>>18px</option>
818
+ <option value="20" <?php if($options=='20'){echo "selected";}?>>20px</option>
819
+ <option value="22" <?php if($options=='22'){echo "selected";}?>>22px</option>
820
+ <option value="24" <?php if($options=='24'){echo "selected";}?>>24px</option>
821
+ </select>
822
+ <?php }
823
+
824
+ public function googlelanguagetranslator_flags_order_cb() {
825
+ $option_name = 'googlelanguagetranslator_flags_order';
826
+ $new_value = '';
827
+
828
+ if ( get_option ( $option_name ) === false ) {
829
+
830
+ // The option does not exist, so we update it.
831
+ update_option( $option_name, $new_value );
832
+ }
833
+
834
+ $options = get_option ( ''.$option_name.'' ); ?>
835
+
836
+ <input type="hidden" id="order" name="googlelanguagetranslator_flags_order" value="<?php print_r(get_option('googlelanguagetranslator_flags_order')); ?>" />
837
+ <?php
838
+ }
839
+
840
+ public function googlelanguagetranslator_css_cb() {
841
+
842
+ $option_name = 'googlelanguagetranslator_css' ;
843
+ $new_value = '';
844
+
845
+ if ( get_option( $option_name ) === false ) {
846
+
847
+ // The option does not exist, so we update it.
848
+ update_option( $option_name, $new_value );
849
+ }
850
+
851
+ $options = get_option (''.$option_name.'');
852
+
853
+ $html = '<textarea style="width:100%; height:200px" name="googlelanguagetranslator_css" id="googlelanguagetranslator_css">'.$options.'</textarea>';
854
+ echo $html;
855
+ }
856
+
857
+ public function googlelanguagetranslator_manage_translations_cb() {
858
+ $option_name = 'googlelanguagetranslator_manage_translations' ;
859
+ $new_value = 0;
860
+
861
+ if ( get_option( $option_name ) === false ) {
862
+
863
+ // The option does not exist, so we update it.
864
+ update_option( $option_name, $new_value );
865
+ }
866
+
867
+ $options = get_option (''.$option_name.'');
868
+
869
+ $html = '<input type="checkbox" name="googlelanguagetranslator_manage_translations" id="googlelanguagetranslator_manage_translations" value="1" '.checked(1,$options,false).'/> &nbsp; Turn on translation management?';
870
+ echo $html;
871
+ }
872
+
873
+ public function googlelanguagetranslator_multilanguage_cb() {
874
+
875
+ $option_name = 'googlelanguagetranslator_multilanguage' ;
876
+ $new_value = 0;
877
+
878
+ if ( get_option( $option_name ) === false ) {
879
+
880
+ // The option does not exist, so we update it.
881
+ update_option( $option_name, $new_value );
882
+ }
883
+
884
+ $options = get_option (''.$option_name.'');
885
+
886
+ $html = '<input type="checkbox" name="googlelanguagetranslator_multilanguage" id="googlelanguagetranslator_multilanguage" value="1" '.checked(1,$options,false).'/> &nbsp; Turn on multilanguage mode?';
887
+ echo $html;
888
+ }
889
+
890
+ public function googlelanguagetranslator_exclude_translation_cb() {
891
+
892
+ $option_name = 'googlelanguagetranslator_exclude_translation';
893
+ $new_value = '';
894
+
895
+ if (get_option($option_name) === false ) {
896
+ // The option does not exist, so we update it.
897
+ update_option( $option_name, $new_value );
898
+ }
899
+
900
+ $options = get_option (''.$option_name.'');
901
+
902
+ $html = '<input type="text" name="'.$option_name.'" id="'.$option_name.'" value="'.$options.'" />';
903
+
904
+ echo $html;
905
+ }
906
+
907
+ public function page_layout_cb() {
908
+ include( plugin_dir_path( __FILE__ ) . '/css/style.php'); ?>
909
+ <?php add_thickbox(); ?>
910
+ <div class="wrap">
911
+ <div id="icon-options-general" class="icon32"></div>
912
+ <h2><span class="notranslate">Google Language Translator</span></h2>
913
+ <form action="<?php echo admin_url( '/options.php'); ?>" method="post">
914
+ <div class="metabox-holder has-right-sidebar" style="float:left; width:65%">
915
+ <div class="postbox" style="width: 100%">
916
+ <h3 class="notranslate">Settings</h3>
917
+
918
+ <?php settings_fields('google_language_translator'); ?>
919
+ <table style="border-collapse:separate" width="100%" border="0" cellspacing="8" cellpadding="0" class="form-table">
920
+ <tr>
921
+ <td style="width:60%" class="notranslate">Plugin Status:</td>
922
+ <td class="notranslate"><?php $this->googlelanguagetranslator_active_cb(); ?></td>
923
+ </tr>
924
+
925
+ <tr class="notranslate">
926
+ <td>Choose the original language of your website</td>
927
+ <td><?php $this->googlelanguagetranslator_language_cb(); ?></td>
928
+ </tr>
929
+
930
+ <tr class="notranslate">
931
+ <td>What translation languages will display in the language box?<br/>("All Languages" option <strong><u>must</u></strong> be chosen to show flags.)</td>
932
+ <td><?php $this->googlelanguagetranslator_language_option_cb(); ?></td>
933
+ </tr>
934
+
935
+ <tr class="notranslate languages">
936
+ <td colspan="2"><?php $this->language_display_settings_cb(); ?></td>
937
+ </tr>
938
+
939
+ <tr class="notranslate">
940
+ <td class="choose_flags_intro">Show flag images?<br/>(Display up to 81 flags above the translator)</td>
941
+ <td class="choose_flags_intro"><?php $this->googlelanguagetranslator_flags_cb(); ?></td>
942
+ </tr>
943
+
944
+ <tr class="notranslate choose_flags">
945
+ <td class="choose_flags">Choose the flags you want to display:</td>
946
+ <td></td>
947
+ </tr>
948
+
949
+ <tr class="notranslate">
950
+ <td colspan="2" class="choose_flags"><?php $this->flag_display_settings_cb(); ?></td>
951
+ </tr>
952
+
953
+ <tr class="notranslate">
954
+ <td>Show floating translation widget?<br/>
955
+ <span>("All Languages" option <strong><u>must</u></strong> be chosen to show widget.)</span>
956
+ </td>
957
+ <td><?php $this->googlelanguagetranslator_floating_widget_cb(); ?></td>
958
+ </tr>
959
+
960
+ <tr class="notranslate">
961
+ <td>Show translate box?</td>
962
+ <td><?php $this->googlelanguagetranslator_translatebox_cb(); ?></td>
963
+ </tr>
964
+
965
+ <tr class="notranslate">
966
+ <td>Layout option:</td>
967
+ <td><?php $this->googlelanguagetranslator_display_cb(); ?></td>
968
+ </tr>
969
+
970
+ <tr class="notranslate">
971
+ <td>Show Google Toolbar?</td>
972
+ <td><?php $this->googlelanguagetranslator_toolbar_cb(); ?></td>
973
+ </tr>
974
+
975
+ <tr class="notranslate">
976
+ <td>Show Google Branding? &nbsp;<a href="https://developers.google.com/translate/v2/attribution" target="_blank">Learn more</a></td>
977
+ <td><?php $this->googlelanguagetranslator_showbranding_cb(); ?></td>
978
+ </tr>
979
+
980
+ <tr class="alignment notranslate">
981
+ <td class="flagdisplay">Align the translator left or right?</td>
982
+ <td class="flagdisplay"><?php $this->googlelanguagetranslator_flags_alignment_cb(); ?></td>
983
+ </tr>
984
+
985
+ <!--<tr class="manage_translations notranslate">
986
+ <td>Turn on translation management? &nbsp;<a href="#TB_inline?width=200&height=300&inlineId=translation-management-description" title="What is Translation Management?" class="thickbox">Learn more</a><div id="translation-management-description" style="display:none"><p>Translation management is an interface that allows you to manage specific words and phrases on your website. The interface is linked directly to your Google Account, and no special subscriptions are necessary to setup this feature.</p><p>If translation management setting is checked, users who browse your website can hover their mouse over specific words and phrases, then send translation suggestions directly to your Google Translate account! You can then "approve" those suggestions, and Google will automatically display them when translations are requested by your users.</p><p>Translation management requires that you insert a custom meta tag into the <code>head</code> section of your website.</p><p><a href="http://translate.google.com/manager/website/settings" target="_blank">Click here to to get the required meta tag</a></p></div></td>
987
+ <td><?php $this->googlelanguagetranslator_manage_translations_cb(); ?></td>
988
+ </tr>-->
989
+
990
+ <tr class="multilanguage notranslate">
991
+ <td>Multilanguage Page option? &nbsp;<a href="#TB_inline?width=200&height=150&inlineId=multilanguage-page-description" title="What is the Multi-Language Page Option?" class="thickbox">Learn more</a><div id="multilanguage-page-description" style="display:none"><p>If checked, Google will automatically convert text written in multiple languages, into the single language requested by your user.</p><p>In most cases, this setting is not recommended, although for certain websites it might be necessary.</p></div></td>
992
+ <td><?php $this->googlelanguagetranslator_multilanguage_cb(); ?></td>
993
+ </tr>
994
+
995
+ <tr class="notranslate">
996
+ <td>Google Analytics:</td>
997
+ <td><?php $this->googlelanguagetranslator_analytics_cb(); ?></td>
998
+ </tr>
999
+
1000
+ <tr class="analytics notranslate">
1001
+ <td>Google Analytics ID (Ex. 'UA-11117410-2')</td>
1002
+ <td><?php $this->googlelanguagetranslator_analytics_id_cb(); ?></td>
1003
+ </tr>
1004
+
1005
+ <tr class="notranslate">
1006
+ <td>Full widget usage in pages/posts/sidebar:</td>
1007
+ <td><code>[google-translator]</code></td>
1008
+ </tr>
1009
+ </table>
1010
+
1011
+ <table style="border-collapse:separate" width="100%" border="0" cellspacing="8" cellpadding="0" class="form-table">
1012
+ <tr class="notranslate">
1013
+ <td style="width:40%">Full widget usage in header/footer or page template:</td>
1014
+ <td style="width:60%"><code>&lt;?php echo do_shortcode('[google-translator]'); ?&gt;</code></td>
1015
+ </tr>
1016
+
1017
+ <tr class="notranslate">
1018
+ <td>Single language usage in<br/>nav menu/pages/posts</td>
1019
+ <td><code>[glt language="Spanish" label="Español"]</code></td>
1020
+ </tr>
1021
+
1022
+ <tr class="notranslate">
1023
+ <td colspan="2">
1024
+ <a href="#TB_inline?width=200&height=450&inlineId=single-language-shortcode-description" title="How to place a single language in your Wordpress menu" class="thickbox">How to place a single language in your Wordpress menu</a>
1025
+ <div id="single-language-shortcode-description" style="display:none">
1026
+ <p>For menu usage, you need to create a new menu, or use an existing menu, by navigating to "Appearance > Menus".</p>
1027
+ <p>First you will need to enable "descriptions" for your menu items, which can be found in a tab labeled "Screen Options" in the upper-right area of the page.</p>
1028
+ <p>Once descriptions are enabled, follow these steps:<br/>
1029
+ <ol>
1030
+ <li>Create a new menu item using "Link" as the menu item type.</li>
1031
+ <li>Use <code style="border:none">#</code> for the URL</li>
1032
+ <li>Enter a navigation label of your choice. This label does not appear on your website - it is meant only to help you identify the menu item.</li>
1033
+ <li>Place the following shortcode into the "description" field, and modify it to display the language and navigation label of your choice:</li>
1034
+ </ol>
1035
+ <p><code>[glt language="Spanish" label="Español"]</code></p>
1036
+ </div>
1037
+ </td>
1038
+ </tr>
1039
+
1040
+ <tr class="notranslate">
1041
+ <td>
1042
+ <?php
1043
+ if (isset($_POST['submit'])) {
1044
+ if (empty($_POST['submit']) && !check_admin_referer( 'glt-save-settings', 'glt-save-settings-nonce' )) {
1045
+ wp_die();
1046
+ } else { echo 'hello'; }
1047
+ }
1048
+ wp_nonce_field('glt-save-settings, glt-save-settings-nonce', false);
1049
+ submit_button();
1050
+ ?>
1051
+ </td>
1052
+ <td></td>
1053
+ </tr>
1054
+ </table>
1055
+ </div> <!-- .postbox -->
1056
+ </div> <!-- .metbox-holder -->
1057
+
1058
+ <div class="metabox-holder" style="float:right; clear:right; width:33%">
1059
+ <div class="postbox">
1060
+ <h3 class="notranslate">Preview</h3>
1061
+ <table style="width:100%">
1062
+ <tr>
1063
+ <td style="box-sizing:border-box; -webkit-box-sizing:border-box; -moz-box-sizing:border-box; padding:15px 15px; margin:0px"><span class="notranslate"> Drag &amp; drop flags to change their position.<br/><br/>(Note: flag order resets when flags are added/removed)</span><br/><br/><?php echo do_shortcode('[google-translator]'); ?><p class="hello"><span class="notranslate">Translated text:</span> &nbsp; <span>Hello</span></p></td>
1064
+ </tr>
1065
+
1066
+ <tr>
1067
+ <td><?php if (isset ($_POST['googlelanguagetranslator_flags_order']) ) { echo $_POST['googlelanguagetranslator_flags_order']; } ?></td>
1068
+ </tr>
1069
+
1070
+
1071
+ </table>
1072
+ </div> <!-- .postbox -->
1073
+ </div> <!-- .metabox-holder -->
1074
+
1075
+ <div id="glt_advanced_settings" class="metabox-holder notranslate" style="float: right; width: 33%;">
1076
+ <div class="postbox">
1077
+ <h3>Advanced Settings</h3>
1078
+ <div class="inside">
1079
+ <table style="border-collapse:separate" width="100%" border="0" cellspacing="8" cellpadding="0" class="form-table">
1080
+ <tr class="notranslate">
1081
+ <td class="advanced">Select flag size:</td>
1082
+ <td class="advanced"><?php $this->googlelanguagetranslator_flag_size_cb(); ?></td>
1083
+ </tr>
1084
+ </table>
1085
+ </div>
1086
+ </div>
1087
+ </div>
1088
+
1089
+
1090
+ <div class="metabox-holder notranslate" style="float: right; width: 33%;">
1091
+ <div class="postbox">
1092
+ <h3>Add CSS Styles</h3>
1093
+ <div class="inside">
1094
+ <p>You can apply any necessary CSS styles below:</p>
1095
+ <?php $this->googlelanguagetranslator_css_cb(); ?>
1096
+ </div>
1097
+ </div>
1098
+ </div>
1099
+ <?php $this->googlelanguagetranslator_flags_order_cb(); ?>
1100
+ </form>
1101
+
1102
+ <div class="metabox-holder notranslate" style="float: right; width: 33%;">
1103
+ <div class="postbox">
1104
+ <h3>GLT Premium 4.0.9 is Here! $30</h3>
1105
+ <div class="inside"><a href="http://www.wp-studio.net/" target="_blank"><img style="background:#444; border-radius:3px; -webkit-border-radius:3px; -moz-border-radius:3px" src="<?php echo plugins_url('google-language-translator/images/logo.png'); ?>"></a><br />
1106
+ <ul id="features" style="margin-left:15px">
1107
+ <li style="list-style:square outside"><span style="color:red; font-weight:bold">New!</span> Manual Translation Module (Experimental)!</li>
1108
+ <li style="list-style:square outside"><span style="color:red; font-weight:bold">New!</span> Exclude any specific area of your website from translation, directly from your settings panel</li>
1109
+ <li style="list-style:square outside">81 Languages</li>
1110
+ <li style="list-style:square outside">jQuery-powered language switcher<br/>(No Adobe Flash required)</li>
1111
+ <li style="list-style:square outside">Add single languages to your menus/pages/posts</li>
1112
+ <li style="list-style:square outside">Show/hide images or text for each language</li>
1113
+ <li style="list-style:square outside">Language switcher loads inline with page content</li>
1114
+ <li style="list-style:square outside">Custom flag choices for English, Spanish and Portuguese</li>
1115
+ <li style="list-style:square outside">User-friendly URLs, hide or show <code>lang</code> attribute</li>
1116
+ <li style="list-style:square outside">Drag/drop flags to re-arrange their order</li>
1117
+ <li style="list-style:square outside">Full access to our support forum</li>
1118
+ <li style="list-style:square outside">FREE access to all future updates</li>
1119
+ </ul>
1120
+ </div>
1121
+ </div>
1122
+ </div>
1123
+
1124
+ <div class="metabox-holder notranslate" style="float: right; width: 33%;">
1125
+ <div class="postbox">
1126
+ <h3>Please Consider A Donation</h3>
1127
+ <div class="inside">If you like this plugin and find it useful, help keep this plugin actively developed by clicking the donate button <br /><br />
1128
+ <form action="https://www.paypal.com/cgi-bin/webscr" method="post">
1129
+ <input type="hidden" name="cmd" value="_donations">
1130
+ <input type="hidden" name="business" value="robertmyrick@hotmail.com">
1131
+ <input type="hidden" name="lc" value="US">
1132
+ <input type="hidden" name="item_name" value="Support Studio 88 Design and help us bring you more Wordpress goodies! Any donation is kindly appreciated. Thank you!">
1133
+ <input type="hidden" name="no_note" value="0">
1134
+ <input type="hidden" name="currency_code" value="USD">
1135
+ <input type="hidden" name="bn" value="PP-DonationsBF:btn_donateCC_LG.gif:NonHostedGuest">
1136
+ <input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
1137
+ <img alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1">
1138
+ </form>
1139
+ <br />
1140
+ <br />
1141
+ </div>
1142
+ </div>
1143
+ </div>
1144
+ </div> <!-- .wrap -->
1145
+ <?php
1146
+ }
1147
+ }
1148
  $google_language_translator = new google_language_translator();
images/flags.png CHANGED
Binary file
images/flags16.png CHANGED
Binary file
images/flags18.png CHANGED
Binary file
images/flags20.png CHANGED
Binary file
images/flags22.png CHANGED
Binary file
readme.txt CHANGED
@@ -1,276 +1,279 @@
1
- === Google Language Translator ===
2
- Contributors: Rob Myrick
3
- Donate link: http://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=47LFA33AC89S6
4
- Plugin link: http://www.wp-studio.net/how-it-works
5
- Tags: language translator, google translator, language translate, google, google language translator, translation, translate, multi language
6
- Requires at least: 2.9
7
- Tested up to: 4.3
8
- stable tag: 5.0.02
9
-
10
- Welcome to Google Language Translator! This plugin allows you to insert the Google Language Translator tool anywhere on your website using shortcode.
11
-
12
- == Description ==
13
-
14
- Settings include: inline or vertical layout, show/hide specific languages, hide/show Google toolbar, and hide/show Google branding. Add the shortcode to pages, posts, and widgets.
15
-
16
- == Installation ==
17
-
18
- 1. Download the zip folder named google-language-translator.zip
19
- 2. Unzip the folder and put it in the plugins directory of your wordpress installation. (wp-content/plugins).
20
- 3. Activate the plugin through the plugin window in the admin panel.
21
- 4. Go to Settings > Google Language Translator, enable the plugin, and then choose your settings.
22
- 5. Copy the shortcode and paste it into a page, post or widget.
23
- 6. Do not use the shortcode twice on a single page - it will not work.
24
-
25
- == Frequently Asked Questions ==
26
-
27
- Q: What should I do if the translate widget does not show on my website?
28
-
29
- 1. Make sure that the plugin is installed and activated.
30
- 2. Verify that a check mark is placed in the activation setting located at "Settings > Google Language Translator".
31
- 3. Verify that the native Wordpress function, wp_footer(), is included in your theme's footer file.
32
- 4. Verify that "Show Language Box?" setting is enabled at "Settings > Google Language Translator".
33
- 5. Use your browser's web tools to ensure that CSS styles are not hiding the translation widget.
34
- 6. Contact support at http://www.wp-studio.net/submit-ticket.
35
-
36
- Q: What should I do if there are no languages being displayed in the language box?
37
-
38
- 1. Make sure that the plugin is installed and activated.
39
- 2. Verify that a check mark is placed in the activation setting located at "Settings > Google Language Translator".
40
- 3. Verify that Adobe Flash is installed in your web browser. Google uses Flash in order to display their language box.
41
- 4. Contact support at http://www.wp-studio.net/submit-ticket.
42
-
43
- Q: Can I exclude certain areas of my website from being translated?
44
-
45
- A: Yes! Add the "notranslate" class to the HTML element containing your text. For example, the following text will be excluded from translation: <span class="notranslate">Hello World!</span>
46
-
47
- == Changelog ==
48
-
49
- 5.0.02
50
- - Updated the Tamil flag to use the Indian flag, instead of Tamil Tigers flag.
51
-
52
- 5.0.01
53
- - Updated style.css to reflect the syntax error connecting to the Chinese flag.
54
-
55
- 5.0.0
56
- - Wordpress security updates added to the settings page [wp_nonce_field()].
57
- - Removed 3 outside Javascript files - these files are now called upon directly from Wordpress CMS.
58
- - Unpacked flags.js p,a,c,k,e,r code. Unknowingly, this method of coding violated Wordpress plugin policy.
59
- - Updated pricing display for GLT Premium. It was displaying $15 previously, but the price had increased since the last update.
60
-
61
- 4.0.9
62
- - Replaced: incorrect Catalonian flag image, with the correct image. I apologize for any inconvenience.
63
- - Fixed: Floating Widget issue - previously it loaded 2 times when shortcode was added, which caused it not to work.
64
-
65
- 4.0.8
66
- - Fixed the small syntax issue related to the Google Analytics tracking number - it was another cause of the language box not displaying.
67
-
68
- 4.0.7
69
- - Fixed a CSS error in the settings panel display.
70
- - Fixed the coding issue when "Specific Languages" option is chosen - the shortcode was not displaying the language dropdown.
71
-
72
- 4.0.6
73
-
74
- - Removed: "onclick" events from diplaying directly inside HTML. Converted those events to jQuery.
75
- - Fixed the shortcode that allows adding single languages to Wordpress menus. (New example is shown on settings page.)
76
- - Consolidated all flag images into image sprites!
77
- - Re-designed 10 flag images to match the quality of the other flags.
78
- - Fixed the incorrect "alt" tags associated with flag images. The "alt" tag now displays the language name.
79
- - Modified text on the settings page - also added some lightbox pop-ups to help explain settings.
80
- - New updates have also been provided for our Premium version (currently version 4.0.1) located at http://www.wp-studio.net/
81
-
82
- 4.0.5
83
-
84
- - Fixed: Display bug when using single language shortcode.
85
- - Added: New link on the Plugins menu page, which links directly to Google Language Translator settings.
86
-
87
-
88
- 4.0.4
89
-
90
- - Added NEW shortcode! Allows placement of single languages into the navigation menu, pages, and posts. See settings panel for usage details.
91
- - Re-factored code in googlelanguagetranslator.php which reduced code to around 950 lines.
92
- - Removed the "de-activation" hook, which previously deleted options when plugin de-activated. Added "uninstall" hook instead, so that settings will be preserved only when user deletes the plugin completely.
93
- - Updated CSS styles for the flags area to prevent themes from overriding layouts.
94
-
95
- 4.0.3
96
-
97
- - Adjusted CSS styles for the flag display.
98
-
99
- 4.0.2
100
-
101
- - Eliminated all (or most) HTML validation errors. Big improvement!
102
- - Re-factored more code to increase efficiency.
103
- - Added de-activation hook to reset all plugin settings when plugin is de-activated. (CSS Overrides and Google Analytics ID setting will remain in place and won't be deleted.)
104
- - Fixed the issue with flag language checkboxes. Users can remove English flag if so desired. Previously, English flag was alway required to stay checked, which was not most user-friendly.
105
-
106
- 4.0.1
107
-
108
- - Fixed PHP errors that were neglected in upgrade to 4.0.
109
- - Added conditionals to prevent scripts from loading when the floating widget is turned off.
110
-
111
- 4.0
112
-
113
- - Added 2 new features: 1) Drag/drop flags to re-arrange their order, and 2) Custom flag sizes (16px to 24px).
114
- - Re-factored code in google-language-translator.php. Languages are now loaded dynamically and are not hard-coded.
115
- - GLT Premium is now released: Updates include multiple flags for English, Spanish, and Portuguese languages; customized URLs with 'lang' attribute; drag/drop flags to re-arrnage their order
116
-
117
- 3.0.9
118
-
119
- - Added a title field to the Google Language Translator widget.
120
- - Removed "unexpected text characters" error upon activation (due to error in activation hook).
121
-
122
- 3.0.8
123
-
124
- - Added 9 new languages into the plugin (Hausa, Igbo, Maori, Mongolian, Nepali, Punjabi, Somali, Yoruba, Zulu).
125
- - Corrected an "undefined variable" error that was being generated in Vertical and Horizontal layouts.
126
- - Re-structured coding once again into an Object-Oriented approach.
127
- - Moved all functions of the base class into 'googlelanguagetranslator.php' and the widget into 'widget.php'.
128
- - Moved all javascript files into it's own JS folder.
129
- - Fixed an display issue with "Edit Translations" - they were being hidden when "No branding" option was chosen.
130
- - Corrected various "comma" errors in the string that outputs the script for loading the translator.
131
- - Changed Changelog in readme.txt to show most recent changes first, instead of last.
132
-
133
- 3.0.7
134
-
135
- - Removed an unnecessary CSS file, left over from development. Sorry for any inconvenience if you received display errors.
136
-
137
- 3.0.6
138
-
139
- - Corrected a small display error in displaying the floating widget correctly.
140
-
141
- 3.0.5
142
-
143
- - Added new Floating Widget (see settings page). The Floating Widget is simply another way for allowing website visitors to translate languages. The functionality is built-in with the existing flag preferences, and can be turned on or off at the administrator's preference. The floating widget can also function in full with both the language box and/or flags showing OR hiding, so the administrator has full control of how it displays. The floating widget is placed at bottom right of the website in the free version, but can be placed in other locations by changing CSS styles associated with the box. The premium version will allow more options as to changing the Floating Widget location.
144
- - Fixed the issue with Dashboard styles loading on the wrong pages. This was causing some annoying display issues on the Wordpress Dashboard.
145
-
146
- 3.0.4
147
-
148
- - Re-factored/re-arranged more code in google languagetransltor.php by placing them into separate files.
149
- - Fixed the issue of Custom CSS box not displaying it's styles to the website. This was only missed in this last update, due to re-arrangement of the files. Sorry for any inconvenience.
150
- - Removed style2.php file, which is unnecessary and was being used in testing.
151
-
152
- 3.0.3
153
-
154
- - Re-factored/re-arranged some of the code in googlelanguagetranslator.php by placing them into separate files.
155
- - Fixed a minor coding issue in glt_widget.php - this was generating an error in Wordpress when debugging.
156
- - Moved all CSS code into a single file. The result is nice, clean inline CSS code that is now called only once.
157
- - Fixed some additional CSS display issues.
158
-
159
- 3.0.2
160
-
161
- - Adjusted additional minor invalid HTML issues on the settings page, and also in the front-end plugin display.
162
-
163
- 3.0.1
164
-
165
- - Changed the url request to Google to allow both unsecured and secured page translations. Previously, some users experienced errors when trying to use the translator on "https://" (secured) pages.
166
- - Adjusted some minor spacing issues in the settings page HTML (caused some annoying red HTML errors when using "View Source" in right-click menu).
167
- - Removed old CSS styles that were added in the previous 3.0 update - the styles were added when Google servers were being updated, and were producing major translation dislay issues until their update was complete. Now the styles I added are no longer needed.
168
-
169
- 3.0
170
-
171
- - Correct a small CSS error that affected the showing/hiding of the Google toolbar.
172
-
173
- 2.9
174
-
175
- ***IMPORTANT: Google's most recent server update is producing display issues for website translation tool. There are major display issues with the translation toolbar and also the translations editing interface. Version 2.9 temporarily hides the edit translation functionality until Google decides to fix this issue, although you can still edit translations directly through your Google account at translate.google.com. Please direct any support requests through Wordpress.org and we will be happy to assist you.
176
-
177
- - Fixed Google Translation toolbar display issue
178
- - Fixed the Edit Translation interface by hiding it temporarily until Google fixes this
179
- - Removed some unneeded styles from the style sheet.
180
- - Fixed some CSS issues for the Google Branding display, which was affected by Google's most recent update
181
-
182
- 2.8
183
-
184
- - Added an option to allow users to manage their own translations directly through their Google Translate account (free). When activated, users can hover over the text of their website, and edit the translations from the webpage directly. Google will remember these translations, and then serve them to users once the edits are made. Users must install the Google Translate Customization meta tag provided through Google Translate here: translate.google.com/manager/website/settings. To obtain this meta tag, users need to configure the Google Translate tool directly from this website (although they will not use this because the plugin provides it), then the user can obtain the meta tag on the "Get Code" screen, which is displayed after configuring the Google Translate tool on this webpage.
185
- - Added an option to allow users to turn on/off Google's multilanguagePage option, that when activated, the original website content will be a forced translation, instead of original content (but only after a translation is made.)
186
- - Added more flexible styles to the settings page, so that left and right panels display nicely to the user.
187
-
188
- 2.7
189
-
190
- - Added Google Analytics tracking capability to the plugin.
191
-
192
- - Added a "CSS Styles" box in the settings panel.
193
-
194
- - Changed the Catalonian flag to its correct flag image.
195
-
196
- - Fixed coding issues that previously updated options incorrectly, which is why many users experienced display issues. All options are now initialized upon plugin activation, which should fix this issue permanently.
197
-
198
- - Fixed a glitch in our usage of the translate API. Previously, when the user clicked the default language, it would toggle back and forth between the default language and "Afrikaans" language. Now, users will see the correct language displayed at all times, no matter how many times it is clicked.
199
-
200
- 2.6
201
-
202
- - Added defaults to all options to ensure there are no more issues with the translator displaying upon installation. Again, sorry for any inconvenience.
203
-
204
- 2.5
205
-
206
- - Eliminated an internal Wordpress error being generated from a coding mistake.
207
-
208
- - Added a default option for the Translator alingment. Previously, this was causing the plugin to disapppear.
209
-
210
- 2.4
211
-
212
- - Found a couple of small display errors in the settings page after uploading version 2.3. Sorry for any inconvenience!
213
-
214
- 2.3
215
-
216
- - Added a "Preview" area on the settings page that allows you to see your settings in action.
217
-
218
- - Added custom flag support for all languages (custom flags available ONLY when selecting the "ALL Languages" setting.
219
-
220
- - Added an option that allows left/right alignment of the translation tool.
221
-
222
- - Added the "Google Language Translator" widget.
223
-
224
- - Updated googlelanguagetranslator.php to properly register setting in the admin settings panel.
225
-
226
- 2.2
227
-
228
- - Added language "Portuguese" and "German" to the Original Language drop-down option on the settings page.
229
-
230
- - Changed flag image for the English language (changed United States flag to the United Kingdom flag).
231
-
232
- - Added link in the settings panel that points to Google's Attribution Policy.
233
-
234
- 2.1
235
-
236
- - Added language "Dutch" to the Original Language drop-down option on the settings page.
237
-
238
- - Added a new CSS class that more accurately hides the "Powered by" text when hiding Google's branding. In previous version, the "Powered by" text was actually disguised by setting it's color to "transparent", but now we have set it's font-size to 0px instead.
239
-
240
- 2.0 Corrected some immediate errors in the 1.9 update.
241
-
242
- 1.9
243
-
244
- - Added 7 flag image choices that, when clicked by website visitors, will change the language displayed, both on the website, AND in the drop-down box (flag language choices are limited to those provided in this plugin).
245
-
246
- - Added 6 additional languages to the translator, as provided in Google's most recent updates ( new languages include Bosnian, Cebuano, Khmer, Marathi, Hmong, Javanese ).
247
-
248
- - Corrected a minor technical issue where the Czech option (on the backend) was incorrectly displaying the Croatian language on the front end.
249
-
250
- - Added jQuery functionality to the settings panel to improve the user experience.
251
-
252
- - Added an option for users to display/hide the flag images.
253
-
254
- - Added an option for users to display/hide the translate box when flags are displayed.
255
-
256
- - Removed the settings.css file - I found a better way of displaying the options without CSS.
257
-
258
- 1.8 Modified google-language-translator.php to display the correct output to the browser when horizontal layout is selected. Previously, it was not displaying at all.
259
-
260
- 1.7 Modified google-language-translator.php so that jQuery and CSS styles were enqueued properly onto the settings page only. Previously, jQuery functionality and CSS styles were being added to all pages of the Wordpresss Dashboard, which was causing functionality and display issues for some users.
261
-
262
- 1.6 Added "Specific Language" support to the plugin settings, which allows the user to choose specific languages that are displayed to website visitors.
263
-
264
- 1.5 Added "Original Language" support to the plugin settings, which allows the user to choose the original language of their website, which ultimately removes the original language as a choice in the language drop-down presented to website visitors.
265
-
266
- 1.4 Corrected display problems associated with CSS styles not being placed correctly in wp_head.
267
-
268
- 1.3 HTML display problem in the sidebar area now fixed. Previously, inserting the [google-translator] plugin into a text widget caused it to display above the widget, instead of inside of it.
269
-
270
- 1.2 Shortcode support is now available for adding [google-translator] to text widgets. I apologize for any inconvenience this may have caused.
271
-
272
- 1.1 The shortcode supplied on the settings page was updated to display '[google-translator]'.
273
-
274
- == Screenshots ==
275
-
276
- 1. Settings include: inline or vertical layout, hide/show Google toolbar, display specific languages, and show/hide Google branding. Add the shortcode to pages, posts, and widgets.
 
 
 
1
+ === Google Language Translator ===
2
+ Contributors: Rob Myrick
3
+ Donate link: http://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=47LFA33AC89S6
4
+ Plugin link: http://www.wp-studio.net/how-it-works
5
+ Tags: language translator, google translator, language translate, google, google language translator, translation, translate, multi language
6
+ Requires at least: 2.9
7
+ Tested up to: 4.3.1
8
+ stable tag: 5.0.03
9
+
10
+ Welcome to Google Language Translator! This plugin allows you to insert the Google Language Translator tool anywhere on your website using shortcode.
11
+
12
+ == Description ==
13
+
14
+ Settings include: inline or vertical layout, show/hide specific languages, hide/show Google toolbar, and hide/show Google branding. Add the shortcode to pages, posts, and widgets.
15
+
16
+ == Installation ==
17
+
18
+ 1. Download the zip folder named google-language-translator.zip
19
+ 2. Unzip the folder and put it in the plugins directory of your wordpress installation. (wp-content/plugins).
20
+ 3. Activate the plugin through the plugin window in the admin panel.
21
+ 4. Go to Settings > Google Language Translator, enable the plugin, and then choose your settings.
22
+ 5. Copy the shortcode and paste it into a page, post or widget.
23
+ 6. Do not use the shortcode twice on a single page - it will not work.
24
+
25
+ == Frequently Asked Questions ==
26
+
27
+ Q: What should I do if the translate widget does not show on my website?
28
+
29
+ 1. Make sure that the plugin is installed and activated.
30
+ 2. Verify that a check mark is placed in the activation setting located at "Settings > Google Language Translator".
31
+ 3. Verify that the native Wordpress function, wp_footer(), is included in your theme's footer file.
32
+ 4. Verify that "Show Language Box?" setting is enabled at "Settings > Google Language Translator".
33
+ 5. Use your browser's web tools to ensure that CSS styles are not hiding the translation widget.
34
+ 6. Contact support at http://www.wp-studio.net/submit-ticket.
35
+
36
+ Q: What should I do if there are no languages being displayed in the language box?
37
+
38
+ 1. Make sure that the plugin is installed and activated.
39
+ 2. Verify that a check mark is placed in the activation setting located at "Settings > Google Language Translator".
40
+ 3. Verify that Adobe Flash is installed in your web browser. Google uses Flash in order to display their language box.
41
+ 4. Contact support at http://www.wp-studio.net/submit-ticket.
42
+
43
+ Q: Can I exclude certain areas of my website from being translated?
44
+
45
+ A: Yes! Add the "notranslate" class to the HTML element containing your text. For example, the following text will be excluded from translation: <span class="notranslate">Hello World!</span>
46
+
47
+ == Changelog ==
48
+
49
+ 5.0.03
50
+ - Added 10 new languages and associated flags: Chichewa, Kazakh, Malagasy, Malayalam, Myanmar(Burmese), Sesotho, Sinhala, Sundanese, Tajik, and Uzbek.
51
+
52
+ 5.0.02
53
+ - Updated the Tamil flag to use the Indian flag, instead of Tamil Tigers flag.
54
+
55
+ 5.0.01
56
+ - Updated style.css to reflect the syntax error connecting to the Chinese flag.
57
+
58
+ 5.0.0
59
+ - Wordpress security updates added to the settings page [wp_nonce_field()].
60
+ - Removed 3 outside Javascript files - these files are now called upon directly from Wordpress CMS.
61
+ - Unpacked flags.js p,a,c,k,e,r code. Unknowingly, this method of coding violated Wordpress plugin policy.
62
+ - Updated pricing display for GLT Premium. It was displaying $15 previously, but the price had increased since the last update.
63
+
64
+ 4.0.9
65
+ - Replaced: incorrect Catalonian flag image, with the correct image. I apologize for any inconvenience.
66
+ - Fixed: Floating Widget issue - previously it loaded 2 times when shortcode was added, which caused it not to work.
67
+
68
+ 4.0.8
69
+ - Fixed the small syntax issue related to the Google Analytics tracking number - it was another cause of the language box not displaying.
70
+
71
+ 4.0.7
72
+ - Fixed a CSS error in the settings panel display.
73
+ - Fixed the coding issue when "Specific Languages" option is chosen - the shortcode was not displaying the language dropdown.
74
+
75
+ 4.0.6
76
+
77
+ - Removed: "onclick" events from diplaying directly inside HTML. Converted those events to jQuery.
78
+ - Fixed the shortcode that allows adding single languages to Wordpress menus. (New example is shown on settings page.)
79
+ - Consolidated all flag images into image sprites!
80
+ - Re-designed 10 flag images to match the quality of the other flags.
81
+ - Fixed the incorrect "alt" tags associated with flag images. The "alt" tag now displays the language name.
82
+ - Modified text on the settings page - also added some lightbox pop-ups to help explain settings.
83
+ - New updates have also been provided for our Premium version (currently version 4.0.1) located at http://www.wp-studio.net/
84
+
85
+ 4.0.5
86
+
87
+ - Fixed: Display bug when using single language shortcode.
88
+ - Added: New link on the Plugins menu page, which links directly to Google Language Translator settings.
89
+
90
+
91
+ 4.0.4
92
+
93
+ - Added NEW shortcode! Allows placement of single languages into the navigation menu, pages, and posts. See settings panel for usage details.
94
+ - Re-factored code in googlelanguagetranslator.php which reduced code to around 950 lines.
95
+ - Removed the "de-activation" hook, which previously deleted options when plugin de-activated. Added "uninstall" hook instead, so that settings will be preserved only when user deletes the plugin completely.
96
+ - Updated CSS styles for the flags area to prevent themes from overriding layouts.
97
+
98
+ 4.0.3
99
+
100
+ - Adjusted CSS styles for the flag display.
101
+
102
+ 4.0.2
103
+
104
+ - Eliminated all (or most) HTML validation errors. Big improvement!
105
+ - Re-factored more code to increase efficiency.
106
+ - Added de-activation hook to reset all plugin settings when plugin is de-activated. (CSS Overrides and Google Analytics ID setting will remain in place and won't be deleted.)
107
+ - Fixed the issue with flag language checkboxes. Users can remove English flag if so desired. Previously, English flag was alway required to stay checked, which was not most user-friendly.
108
+
109
+ 4.0.1
110
+
111
+ - Fixed PHP errors that were neglected in upgrade to 4.0.
112
+ - Added conditionals to prevent scripts from loading when the floating widget is turned off.
113
+
114
+ 4.0
115
+
116
+ - Added 2 new features: 1) Drag/drop flags to re-arrange their order, and 2) Custom flag sizes (16px to 24px).
117
+ - Re-factored code in google-language-translator.php. Languages are now loaded dynamically and are not hard-coded.
118
+ - GLT Premium is now released: Updates include multiple flags for English, Spanish, and Portuguese languages; customized URLs with 'lang' attribute; drag/drop flags to re-arrnage their order
119
+
120
+ 3.0.9
121
+
122
+ - Added a title field to the Google Language Translator widget.
123
+ - Removed "unexpected text characters" error upon activation (due to error in activation hook).
124
+
125
+ 3.0.8
126
+
127
+ - Added 9 new languages into the plugin (Hausa, Igbo, Maori, Mongolian, Nepali, Punjabi, Somali, Yoruba, Zulu).
128
+ - Corrected an "undefined variable" error that was being generated in Vertical and Horizontal layouts.
129
+ - Re-structured coding once again into an Object-Oriented approach.
130
+ - Moved all functions of the base class into 'googlelanguagetranslator.php' and the widget into 'widget.php'.
131
+ - Moved all javascript files into it's own JS folder.
132
+ - Fixed an display issue with "Edit Translations" - they were being hidden when "No branding" option was chosen.
133
+ - Corrected various "comma" errors in the string that outputs the script for loading the translator.
134
+ - Changed Changelog in readme.txt to show most recent changes first, instead of last.
135
+
136
+ 3.0.7
137
+
138
+ - Removed an unnecessary CSS file, left over from development. Sorry for any inconvenience if you received display errors.
139
+
140
+ 3.0.6
141
+
142
+ - Corrected a small display error in displaying the floating widget correctly.
143
+
144
+ 3.0.5
145
+
146
+ - Added new Floating Widget (see settings page). The Floating Widget is simply another way for allowing website visitors to translate languages. The functionality is built-in with the existing flag preferences, and can be turned on or off at the administrator's preference. The floating widget can also function in full with both the language box and/or flags showing OR hiding, so the administrator has full control of how it displays. The floating widget is placed at bottom right of the website in the free version, but can be placed in other locations by changing CSS styles associated with the box. The premium version will allow more options as to changing the Floating Widget location.
147
+ - Fixed the issue with Dashboard styles loading on the wrong pages. This was causing some annoying display issues on the Wordpress Dashboard.
148
+
149
+ 3.0.4
150
+
151
+ - Re-factored/re-arranged more code in google languagetransltor.php by placing them into separate files.
152
+ - Fixed the issue of Custom CSS box not displaying it's styles to the website. This was only missed in this last update, due to re-arrangement of the files. Sorry for any inconvenience.
153
+ - Removed style2.php file, which is unnecessary and was being used in testing.
154
+
155
+ 3.0.3
156
+
157
+ - Re-factored/re-arranged some of the code in googlelanguagetranslator.php by placing them into separate files.
158
+ - Fixed a minor coding issue in glt_widget.php - this was generating an error in Wordpress when debugging.
159
+ - Moved all CSS code into a single file. The result is nice, clean inline CSS code that is now called only once.
160
+ - Fixed some additional CSS display issues.
161
+
162
+ 3.0.2
163
+
164
+ - Adjusted additional minor invalid HTML issues on the settings page, and also in the front-end plugin display.
165
+
166
+ 3.0.1
167
+
168
+ - Changed the url request to Google to allow both unsecured and secured page translations. Previously, some users experienced errors when trying to use the translator on "https://" (secured) pages.
169
+ - Adjusted some minor spacing issues in the settings page HTML (caused some annoying red HTML errors when using "View Source" in right-click menu).
170
+ - Removed old CSS styles that were added in the previous 3.0 update - the styles were added when Google servers were being updated, and were producing major translation dislay issues until their update was complete. Now the styles I added are no longer needed.
171
+
172
+ 3.0
173
+
174
+ - Correct a small CSS error that affected the showing/hiding of the Google toolbar.
175
+
176
+ 2.9
177
+
178
+ ***IMPORTANT: Google's most recent server update is producing display issues for website translation tool. There are major display issues with the translation toolbar and also the translations editing interface. Version 2.9 temporarily hides the edit translation functionality until Google decides to fix this issue, although you can still edit translations directly through your Google account at translate.google.com. Please direct any support requests through Wordpress.org and we will be happy to assist you.
179
+
180
+ - Fixed Google Translation toolbar display issue
181
+ - Fixed the Edit Translation interface by hiding it temporarily until Google fixes this
182
+ - Removed some unneeded styles from the style sheet.
183
+ - Fixed some CSS issues for the Google Branding display, which was affected by Google's most recent update
184
+
185
+ 2.8
186
+
187
+ - Added an option to allow users to manage their own translations directly through their Google Translate account (free). When activated, users can hover over the text of their website, and edit the translations from the webpage directly. Google will remember these translations, and then serve them to users once the edits are made. Users must install the Google Translate Customization meta tag provided through Google Translate here: translate.google.com/manager/website/settings. To obtain this meta tag, users need to configure the Google Translate tool directly from this website (although they will not use this because the plugin provides it), then the user can obtain the meta tag on the "Get Code" screen, which is displayed after configuring the Google Translate tool on this webpage.
188
+ - Added an option to allow users to turn on/off Google's multilanguagePage option, that when activated, the original website content will be a forced translation, instead of original content (but only after a translation is made.)
189
+ - Added more flexible styles to the settings page, so that left and right panels display nicely to the user.
190
+
191
+ 2.7
192
+
193
+ - Added Google Analytics tracking capability to the plugin.
194
+
195
+ - Added a "CSS Styles" box in the settings panel.
196
+
197
+ - Changed the Catalonian flag to its correct flag image.
198
+
199
+ - Fixed coding issues that previously updated options incorrectly, which is why many users experienced display issues. All options are now initialized upon plugin activation, which should fix this issue permanently.
200
+
201
+ - Fixed a glitch in our usage of the translate API. Previously, when the user clicked the default language, it would toggle back and forth between the default language and "Afrikaans" language. Now, users will see the correct language displayed at all times, no matter how many times it is clicked.
202
+
203
+ 2.6
204
+
205
+ - Added defaults to all options to ensure there are no more issues with the translator displaying upon installation. Again, sorry for any inconvenience.
206
+
207
+ 2.5
208
+
209
+ - Eliminated an internal Wordpress error being generated from a coding mistake.
210
+
211
+ - Added a default option for the Translator alingment. Previously, this was causing the plugin to disapppear.
212
+
213
+ 2.4
214
+
215
+ - Found a couple of small display errors in the settings page after uploading version 2.3. Sorry for any inconvenience!
216
+
217
+ 2.3
218
+
219
+ - Added a "Preview" area on the settings page that allows you to see your settings in action.
220
+
221
+ - Added custom flag support for all languages (custom flags available ONLY when selecting the "ALL Languages" setting.
222
+
223
+ - Added an option that allows left/right alignment of the translation tool.
224
+
225
+ - Added the "Google Language Translator" widget.
226
+
227
+ - Updated googlelanguagetranslator.php to properly register setting in the admin settings panel.
228
+
229
+ 2.2
230
+
231
+ - Added language "Portuguese" and "German" to the Original Language drop-down option on the settings page.
232
+
233
+ - Changed flag image for the English language (changed United States flag to the United Kingdom flag).
234
+
235
+ - Added link in the settings panel that points to Google's Attribution Policy.
236
+
237
+ 2.1
238
+
239
+ - Added language "Dutch" to the Original Language drop-down option on the settings page.
240
+
241
+ - Added a new CSS class that more accurately hides the "Powered by" text when hiding Google's branding. In previous version, the "Powered by" text was actually disguised by setting it's color to "transparent", but now we have set it's font-size to 0px instead.
242
+
243
+ 2.0 Corrected some immediate errors in the 1.9 update.
244
+
245
+ 1.9
246
+
247
+ - Added 7 flag image choices that, when clicked by website visitors, will change the language displayed, both on the website, AND in the drop-down box (flag language choices are limited to those provided in this plugin).
248
+
249
+ - Added 6 additional languages to the translator, as provided in Google's most recent updates ( new languages include Bosnian, Cebuano, Khmer, Marathi, Hmong, Javanese ).
250
+
251
+ - Corrected a minor technical issue where the Czech option (on the backend) was incorrectly displaying the Croatian language on the front end.
252
+
253
+ - Added jQuery functionality to the settings panel to improve the user experience.
254
+
255
+ - Added an option for users to display/hide the flag images.
256
+
257
+ - Added an option for users to display/hide the translate box when flags are displayed.
258
+
259
+ - Removed the settings.css file - I found a better way of displaying the options without CSS.
260
+
261
+ 1.8 Modified google-language-translator.php to display the correct output to the browser when horizontal layout is selected. Previously, it was not displaying at all.
262
+
263
+ 1.7 Modified google-language-translator.php so that jQuery and CSS styles were enqueued properly onto the settings page only. Previously, jQuery functionality and CSS styles were being added to all pages of the Wordpresss Dashboard, which was causing functionality and display issues for some users.
264
+
265
+ 1.6 Added "Specific Language" support to the plugin settings, which allows the user to choose specific languages that are displayed to website visitors.
266
+
267
+ 1.5 Added "Original Language" support to the plugin settings, which allows the user to choose the original language of their website, which ultimately removes the original language as a choice in the language drop-down presented to website visitors.
268
+
269
+ 1.4 Corrected display problems associated with CSS styles not being placed correctly in wp_head.
270
+
271
+ 1.3 HTML display problem in the sidebar area now fixed. Previously, inserting the [google-translator] plugin into a text widget caused it to display above the widget, instead of inside of it.
272
+
273
+ 1.2 Shortcode support is now available for adding [google-translator] to text widgets. I apologize for any inconvenience this may have caused.
274
+
275
+ 1.1 The shortcode supplied on the settings page was updated to display '[google-translator]'.
276
+
277
+ == Screenshots ==
278
+
279
+ 1. Settings include: inline or vertical layout, hide/show Google toolbar, display specific languages, and show/hide Google branding. Add the shortcode to pages, posts, and widgets.